Fix player destroying.

Regression from moving to a component.
This commit is contained in:
FireMasterK 2021-04-03 21:15:45 +05:30
parent 2c8bde922c
commit 87e922e06d
No known key found for this signature in database
GPG Key ID: 8DFF5DD33E93DB58
2 changed files with 7 additions and 7 deletions

View File

@ -136,6 +136,13 @@ export default {
ui.configure(config); ui.configure(config);
}); });
} }
},
beforeUnmount() {
if (this.player) {
this.player.destroy();
this.player = undefined;
this.ui = undefined;
}
} }
}; };
</script> </script>

View File

@ -98,13 +98,6 @@ export default {
this.getVideoData(); this.getVideoData();
this.getSponsors(); this.getSponsors();
}, },
beforeUnmount() {
if (window.player) {
window.player.destroy();
window.player = undefined;
window.ui = undefined;
}
},
watch: { watch: {
"$route.query.v": function(v) { "$route.query.v": function(v) {
if (v) { if (v) {