mirror of
https://github.com/mmjee/Piped-Material.git
synced 2024-12-06 19:26:36 +01:00
Fix
This commit is contained in:
+15
-11
@@ -278,6 +278,20 @@ export default {
|
||||
player.defaultPlaybackRate = rate
|
||||
}
|
||||
})
|
||||
},
|
||||
|
||||
destroy () {
|
||||
if (this.$ui) {
|
||||
this.$ui.destroy()
|
||||
this.$ui = undefined
|
||||
this.$player = undefined
|
||||
}
|
||||
if (this.$player) {
|
||||
this.$player.destroy()
|
||||
this.$player = undefined
|
||||
}
|
||||
if (this.unsubToKeybindings) this.unsubToKeybindings()
|
||||
if (this.$refs.container) this.$refs.container.querySelectorAll('div').forEach(node => node.remove())
|
||||
}
|
||||
},
|
||||
|
||||
@@ -341,17 +355,7 @@ export default {
|
||||
},
|
||||
|
||||
beforeDestroy () {
|
||||
if (this.$ui) {
|
||||
this.$ui.destroy()
|
||||
this.$ui = undefined
|
||||
this.$player = undefined
|
||||
}
|
||||
if (this.$player) {
|
||||
this.$player.destroy()
|
||||
this.$player = undefined
|
||||
}
|
||||
this.unsubToKeybindings()
|
||||
this.$refs.container.querySelectorAll('div').forEach(node => node.remove())
|
||||
this.destroy()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user