Quellcode durchsuchen

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

Jonathan Graham vor 3 Jahren
Ursprung
Commit
04e68cbdee
1 geänderte Dateien mit 2 neuen und 0 gelöschten Zeilen
  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) {