~phablet-team/mediaplayer-app/remove_powerd

« back to all changes in this revision

Viewing changes to src/qml/player/Controls.qml

Implemented support for share movie scene on share menu.

Show diffs side-by-side

added added

removed removed

Lines of Context:
150
150
            width: units.gu(3)
151
151
 
152
152
            onClicked: {
 
153
                var position = video.position
 
154
                if (position === 0) {
 
155
                    if (video.duration > 10000) {
 
156
                        position = 10000;
 
157
                    } else if (video.duration > 0){
 
158
                        position = video.duration / 2
 
159
                    }
 
160
                }
 
161
                if (position >= 0) {
 
162
                    _sharePopover.picturePath = "image://video/" + video.source + "/" + position;
 
163
                }
153
164
                _sharePopover.caller = _shareButton
154
165
                _sharePopover.show()
155
166
            }
189
200
                   // TODO: discuss this with designers
190
201
                   // shift 3s to avoid black frame in the position 0
191
202
                   var pos = Math.floor(i * frameSize);
192
 
                   _sceneSelectorModel.append({"thumbnail": "image://video/" + video.source + "/"+ (pos + 3000),
 
203
                   _sceneSelectorModel.append({"thumbnail": "image://video/" + video.source + "/" + (pos + 3000),
193
204
                                               "start" : pos,
194
205
                                               "duration" : frameSize})
195
206
               }