Story: Fix video clean up when unmounted (#4473)

This commit is contained in:
Alexander Zinchuk 2024-04-19 13:38:24 +04:00
parent b9ed982170
commit 6d9406e109

View File

@ -2,5 +2,9 @@ export default function unloadVideo(video: HTMLVideoElement) {
video.pause();
// https://github.com/shaka-project/shaka-player/commit/0e3d10e61cb08cc35750e48face4e58f24542fc8
video.removeAttribute('src');
while (video.firstChild) {
video.removeChild(video.firstChild);
}
video.load();
}