Optimize when destroyed
This commit is contained in:
parent
10c94c4c24
commit
9ebf319211
@ -22,7 +22,7 @@ export default {
|
||||
const protocol = import.meta.env.VITE_HTTPS === 'true' ? 'https://' : 'http://'
|
||||
|
||||
const badgesFetch = await fetch(`${protocol}${import.meta.env.VITE_BACKEND_DOMAIN}/api/badges?channelName=${props.channelName}`)
|
||||
let badges: Badge[] = await badgesFetch.json()
|
||||
let badges: Badge[] = (await badgesFetch.json()).data
|
||||
|
||||
return {
|
||||
ws: new WebSocket(`ws://${import.meta.env.VITE_BACKEND_DOMAIN}`),
|
||||
@ -75,6 +75,10 @@ export default {
|
||||
},
|
||||
components: {
|
||||
BadgeVue
|
||||
},
|
||||
unmounted() {
|
||||
this.messages = []
|
||||
this.badges = []
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
@ -34,6 +34,9 @@ export default {
|
||||
this.player = videojs('video-player', this.options, () => {
|
||||
createQualitySelector(this.player)
|
||||
})
|
||||
},
|
||||
unmounted() {
|
||||
this.player.dispose()
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
Loading…
x
Reference in New Issue
Block a user