Skip to content

Commit dc01a07

Browse files
committed
Fix ui properties not getting cleared
1 parent 92d44fd commit dc01a07

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
@@ -2862,6 +2862,16 @@ export default defineComponent({
28622862
await player.destroy()
28632863
player = null
28642864
}
2865+
2866+
// shaka-player doesn't clear these itself, which prevents shaka.ui.Overlay from being garbage collected
2867+
// Should really be fixed in shaka-player but it's easier just to do it ourselves
2868+
if (container.value) {
2869+
container.value.ui = null
2870+
}
2871+
2872+
if (video.value) {
2873+
video.value.ui = null
2874+
}
28652875
}
28662876

28672877
expose({

0 commit comments

Comments
 (0)