-
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
Getting BufferStalledError on Safari #5274
Comments
It looks like after the MediaSource is put in the "ended" state, when seeking outside of the buffered ranges, Safari issues "seeked" events without waiting for media in the buffer to be able to play. This leads to these seeking being treated as stalls as the player buffers media. |
I'm finding the behavior in Safari is intermittent, and not directly related to the MediaSource ended state. When seeking in a "bad session", Safari will emit: In a good session, the seek related events match the expected behavior observed in other browsers: HLS.js doesn't depend on these events. It depends on changes to the It's worth noting that in the "bad session" scenario, currentTime does not advance for at least 1/4s after canplay is issued (and media has been buffered) which is why HLS.js reports a stall. |
* Handle fragments and parts with a GAP tag/attribute * Improve GAP fragment picking, post gap buffering, and level switching error resolution * Cleanup FRAG_GAP error creation and inlcude current buffer length in forward gap buffer limit * Fix gap jump over waiting for data stall when buffer length is larger than maxBufferHole but less than one second * Warn when observing "seeked" event with empty buffer (Related to #5274) * Handle forward buffering past GAP tags in alt audio Playlists * Fix GAP tag handling with Redundant Streams * Implement penalty box for Redundant Streams
What version of Hls.js are you using?
v1.3.4
What browser (including version) are you using?
Safari Version 16.2 (18614.3.7.1.5)
What OS (including version) are you using?
Mac OS Ventura 13.1
Test stream
https://hls-js.netlify.app/demo/?src=https%3A%2F%2Ftest-streams.mux.dev%2Fx36xhzz%2Fx36xhzz.m3u8&demoConfig=eyJlbmFibGVTdHJlYW1pbmciOnRydWUsImF1dG9SZWNvdmVyRXJyb3IiOnRydWUsInN0b3BPblN0YWxsIjpmYWxzZSwiZHVtcGZNUDQiOmZhbHNlLCJsZXZlbENhcHBpbmciOi0xLCJsaW1pdE1ldHJpY3MiOi0xfQ==
Configuration
Additional player setup steps
No response
Checklist
Steps to reproduce
Buffer stalled error
is shown.Expected behaviour
Is expected to not receive an error.
What actually happened?
Received a
Buffer stalled error
.Console output
Chrome media internals output
No response
The text was updated successfully, but these errors were encountered: