-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
GAP Tag/Attribute Support with FRAG_GAP Error #5257
Conversation
Hi @robwalch
The second case is when we have a large number of segments with a gap attribute. The player loops on a single fragment
Will prepare a more complex stream with more cases. |
33224cf
to
d23e53a
Compare
ad4b8db
to
9399985
Compare
Hi @mtoczko, Thanks for taking a look.
I'm not seeing a nudge issue with that stream. With my latest changes gaps are jumped:
It is possible there is a stall first. I'm testing in Chrome, but maybe you're seeing different behavior in another browser?
I haven't looked at samples with more than one or two consecutive GAP segments. There could be an issue that if another level is not available to switch to. The latest changes make sure that on GAP the a switch is made so that the player looks for segments without GAPs. |
d23e53a
to
90984f9
Compare
50be628
to
026401c
Compare
e629562
to
981875c
Compare
026401c
to
01e48f4
Compare
8dc06f8
to
938a05e
Compare
Hi @robwalch
It appears so randomly, the same browser. A few hours difference after between tests. |
The difference in stalled.log is that the stall is detected with 0.257s of unplayed media in the buffer, so it chooses to nudge the playback because it hasn't reached the gap yet. In working.log, it stalls in the gap, recognizes that the gap fragments at this location and jumps. Thinking about the best solution for this. I would have expected to see more nudging, or nudging up to the gap, and then the gap jump taking place. |
It looks like the stall is because the buffer is low enough to put the player in a waiting state (we don't check that) and the nudge only puts the player into a seeking state which will never resolve because the next fragment is a gap and the nudge only reduces the forward buffer. I haven't been able to repro, but the code that is failing us here is in gap-controller. It's probably the dependency on hls.js/src/controller/gap-controller.ts Lines 101 to 114 in 747e15f
|
Hi @robwalch |
Yes. I can reproduce by seeking to with 0.1 ( |
7b363e5
to
dd6b109
Compare
9e0e4fb
to
9d33020
Compare
Hi @robwalch |
Hi @robwalch stream:
|
What is the expectation here? That the player would switch to redundant path B after gaps are found in path A? I found an issue with audio-stream-contoller buffering when the video buffer is segmented. Once I address that, I will circle back to the error handling and look at what's missing. |
e85d938
to
eafcd6c
Compare
Hi @mtoczko, These changes fix most of the level switching and forward buffering issues with https://mtoczko.github.io/hls-test-streams/test-gap/playlist.m3u8 |
cc9e635
to
c9461c0
Compare
… error resolution
…forward gap buffer limit
… than maxBufferHole but less than one second
c9461c0
to
02a8b47
Compare
This PR will...
Do not load GAP segments or parts. Error when encountering a segment with a GAP in a level to trigger a level switch (clients are expected to look for alternate segments to load when a GAP is encountered). Track segments with a GAP as partially buffered in fragment-tracker to avoid reload looping and expedite finding of the next available fragment. Allow the gap-controller to skip over unbufferable gaps (when level switch is not an option).
Why is this Pull Request needed?
Skips over content with gaps.
Are there any points in the code the reviewer needs to double check?
Future enhancements may include appending silence and/or still frames. Such enhancements are not in scope for this release.
Resolves issues:
#2940 (avoid loading and skips)