-
Notifications
You must be signed in to change notification settings - Fork 2.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix m3u8 does not reload properly in low latency mode which causes buffer stalled #6975
base: master
Are you sure you want to change the base?
Conversation
…old-back, which is popular in low latency mode Without this fix, m3u8 is reload after target-duration and cause the low latency stream buffer to be stalled, when the total parts loaded in the buffer is lower than target-duration (which is a property for normal-latency mode). This fix move to use partTarget as reference for m3u8 reload interval if the low latency mode is enabled.
Low-latency HLS playlist are expected to implement blocking reload. Without it, clients shouldn't even attempt to load parts or play from part holdback. See HLS spec Appendix B.1: Low-Latency Server Configuration Profile
Is there a reason why you are not using blocking reload on a playlist with parts (#EXT-X-SERVER-CONTROL:CAN-BLOCK-RELOAD=YES)? If you do not, you should not expect clients to use parts. The |
Thank you for the explanation. Due to the complexity on the server side so we haven't implemented the feature yet but yes, agree that we should have that feature enabled for low latency. Btw, if so, is it true that hls.js should treat my m3u8 as regular-latency mode and should not load these parts? Let's consider it as a malformed manifest. |
It should. To do so, in |
This fix move to use partTarget as reference for m3u8 reload interval if the low latency mode is enabled.
Why is this Pull Request needed?
Without this fix, m3u8 is reload after target-duration and cause the low latency stream buffer to be stalled, when the total parts loaded in the buffer is lower than target-duration (which is a property for normal-latency mode).
Are there any points in the code the reviewer needs to double check?
I think this can be optimized more (increase the interval to partTarget + hint.duration) to reduce m3u8 reload if PRELOAD HINT is fully supported as in #3988. However, it's risky as the PRELOAD HINT has to carefully check for whether the hinted part is fully available or not.
Resolves issues:
This manifest will cause hlsjs to be stuck as the very first m3u8 reload is set to 4 (TARGETDURATION) but the buffer loaded on 3 parts (PART-HOLD-BACK = 3.84):
Checklist