on xenial help sign in
dont store the position if we reach the end of the video, the very last second
92dd935Andrea Cimitan
qml/Dash/Previews/PreviewInlineVideo.qml+6−1
@@ -49,7 +49,12 @@ PreviewWidget {
49 }
49 }
50
50
51 function storePlaybackState() {
51 function storePlaybackState() {
52+ if ((services.mediaPlayer.duration - services.mediaPlayer.position) < 1000) {
53+ // we're at the end of the video
54+ PreviewSingleton.widgetExtraData[widgetExtraDataKey] = 0;
55+ } else {
52− PreviewSingleton.widgetExtraData[widgetExtraDataKey] = services.mediaPlayer.position;
56+ PreviewSingleton.widgetExtraData[widgetExtraDataKey] = services.mediaPlayer.position;
57+ }
53 }
58 }
54
59
55 function restorePlaybackState() {
60 function restorePlaybackState() {