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:
parent
1937edeef7
commit
419f09d098
1 changed files with 3 additions and 1 deletions
|
@ -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();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue