-
Is there a way of not throwing away the test fragment requested by setting Like, if a user has slow internet, it would be great if the first fragment in the lowest quality requested by HLS.js could be played instead of being requested again. I'm talking about this configuration: const hls = new Hls({
startLevel: -1
}) Resulting in: Instead of: |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 1 reply
-
No. This is the path for loading the bitrate test fragment. It is not selected based on the startPosition, and it is flagged with hls.js/src/controller/stream-controller.ts Line 1193 in 84e4fbd |
Beta Was this translation helpful? Give feedback.
-
What you can do is start on level 0. Then, once loaded, change current level to throw that first segment out, or do nothing and let it switch later. const hls = new Hls({
startLevel: 0
});
hls.once(Hls.Events.FRAG_LOADED, (n, data) => {
// choose whether to use the segment of not based on data.frag.stats
// setting `currentLevel` will drop or flush the fragment and make an auto switch. Don't do this if you want to use this segment.
hls.currentLevel = -1;
}); |
Beta Was this translation helpful? Give feedback.
No. This is the path for loading the bitrate test fragment. It is not selected based on the startPosition, and it is flagged with
fragment.bitrateTest
so that it is not used for any other purpose:hls.js/src/controller/stream-controller.ts
Line 1193 in 84e4fbd