Sfoglia il codice sorgente

fix(EditSong): when picking a different YouTube ID, video player should be reloaded

Jonathan Graham 3 anni fa
parent
commit
04e68cbdee
1 ha cambiato i file con 2 aggiunte e 0 eliminazioni
  1. 2 0
      frontend/src/store/modules/modals/editSong.js

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

@@ -37,6 +37,7 @@ export default {
 			commit("resolveReport", reportId),
 		updateYoutubeId: ({ commit }, youtubeId) => {
 			commit("updateYoutubeId", youtubeId);
+			commit("loadVideoById", youtubeId, 0);
 		}
 	},
 	mutations: {
@@ -52,6 +53,7 @@ export default {
 			state.video.player.stopVideo();
 		},
 		loadVideoById(state, id, skipDuration) {
+			state.song.duration = -1;
 			state.video.player.loadVideoById(id, skipDuration);
 		},
 		pauseVideo(state, status) {