Clean up HLS stream

Without this, it will continue loading chunks in the background.
This commit is contained in:
Chandler Swift 2024-02-02 21:46:21 -06:00
parent 572a8c6d3c
commit acad9c5944
Signed by: chandlerswift
GPG key ID: A851D929D52FB93F
2 changed files with 10 additions and 6 deletions

View file

@ -62,6 +62,7 @@ for (let [state, url] of Object.entries(allStates)) {
var hls = new Hls();
hls.loadSource(view.src);
hls.attachMedia(video);
vectorLayer.destroyPopupCallback = () => hls.destroy();
}
// iDevice support, untested (only works in Safari; required for iPhones)
else if (video.canPlayType('application/vnd.apple.mpegurl')) {