0
0
Fork 0
mirror of https://github.com/VueTubeApp/VueTube synced 2024-11-25 12:45:17 +00:00

also exit fullscreen when going back to prior video

This commit is contained in:
Ethan 2022-03-23 10:21:02 -05:00
parent 1937edeef7
commit 419f09d098

View file

@ -189,11 +189,13 @@ export default {
},
watch: {
// Watch for change in the route query string (in this case, ?v=xxxxxxxx to ?v=yyyyyyyy)
// When change is detected, reset and run getVideo function again
$route: {
deep: true,
handler(newRt, oldRt) {
if (newRt.query.v != oldRt.query.v) {
// Exit fullscreen if currently in fullscreen
this.$refs.player.webkitExitFullscreen();
// Reset player and run getVideo function again
this.vidSrc = "";
this.getVideo();
}