瀏覽代碼

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

Kristian Vos 2 年之前
父節點
當前提交
a7164b65d9
共有 1 個文件被更改,包括 4 次插入2 次删除
  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;