Selaa lähdekoodia

fix(EditSong): clicking on the seekerbar while the video was stopped would start the video from 0

Kristian Vos 3 vuotta sitten
vanhempi
commit
a7164b65d9
1 muutettua tiedostoa jossa 4 lisäystä ja 2 poistoa
  1. 4 2
      frontend/src/store/modules/modals/editSong.js

+ 4 - 2
frontend/src/store/modules/modals/editSong.js

@@ -75,8 +75,10 @@ export default {
 				state.originalSong = {};
 		},
 		stopVideo(state) {
-			if (state.video.player && state.video.player.stopVideo)
-				state.video.player.stopVideo();
+			if (state.video.player && state.video.player.pauseVideo) {
+				state.video.player.pauseVideo();
+				state.video.player.seekTo(0);
+			}
 		},
 		loadVideoById(state, id, skipDuration) {
 			state.song.duration = -1;