Skip to content

Commit d9a27b8

Browse files
committed
Fix ui properties not getting cleared
1 parent 1e5c6ef commit d9a27b8

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

src/renderer/components/ft-shaka-video-player/ft-shaka-video-player.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2717,6 +2717,16 @@ export default defineComponent({
27172717
await player.destroy()
27182718
player = null
27192719
}
2720+
2721+
// shaka-player doesn't clear these itself, which prevents shaka.ui.Overlay from being garbage collected
2722+
// Should really be fixed in shaka-player but it's easier just to do it ourselves
2723+
if (container.value) {
2724+
container.value.ui = null
2725+
}
2726+
2727+
if (video.value) {
2728+
video.value.ui = null
2729+
}
27202730
}
27212731

27222732
expose({

0 commit comments

Comments
 (0)