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);
});
}
},
beforeUnmount() {
if (this.player) {
this.player.destroy();
this.player = undefined;
this.ui = undefined;
}
}
};
</script>

View file

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