video-dev / hls.js

HLS.js is a JavaScript library that plays HLS in browsers with support for MSE.
https://hlsjs.video-dev.org/demo
Other
14.75k stars 2.56k forks source link

xhr loop #4797

Closed custafit closed 4 months ago

custafit commented 2 years ago

xhr requests loop even after i call hls.stopLoad() or hls.destroy()

Environment : Quasar application (vuejs3) player: vue-plyr hls 1.1.5 code:

hls.attachMedia(plyr.value.player.media);
              hls.on(Hls.Events.MEDIA_ATTACHED, () => {
                console.log("player and media are now attached");
                hls.loadSource(
                  `https:///${videoLink.value}/playlist.m3u8`
                );
                hls.on(Hls.Events.MANIFEST_PARSED, function (event, data) {
                  console.log(
                    "manifest loaded, found " +
                      data.levels.length +
                      " quality level"
                  );
                  console.log(hls.levels);
                });
              });

    hls.autoLevelCapping = 1;

    window.hls = hls;

// on before unmount this code is executed
  plyr.value.player.pause();
hls.stopLoad();
 hls.detachMedia();
hls.destroy();

bgReport

custafit commented 2 years ago

hls version is "hls.js": "^1.1.5",

robwalch commented 2 years ago

I found that key loading and live playlist reloading are not aborted when stop load is called. That does not match the screenshot or issue description which still does not provide enough information to reproduce.