fix: destroy hls.js instance on media unmount (#749)

This commit is contained in:
Wesley Luyten
2026-03-06 11:30:48 +11:00
committed by GitHub
parent 5fc52aa969
commit c4e8bbd3a2
4 changed files with 21 additions and 7 deletions
@@ -25,4 +25,12 @@ export class HlsVideo extends HlsCustomMedia {
this.src = newValue ?? '';
}
}
disconnectedCallback(): void {
super.disconnectedCallback();
if (!this.hasAttribute('keep-alive')) {
this.destroy();
}
}
}