Skip to content

How do cached fragments interact with level changes in HLS? #5217

Answered by robwalch
bennlich asked this question in Q&A
Discussion options

You must be logged in to vote

HLS.js does not cache fragments per se. Not to be confused with content cached by the browser, I think you are referring to buffered fragments. That is, fragments appended via MSE to the media SourceBuffer(s). HLS.js does not reload or rebuffer media that is already buffered. You can flush sections of the buffer if you want HLS.js to reload those parts of the timeline.

Look at API.md for details on configuring back and forward buffer length backBufferLength. There are several settings that control how far ahead HLS.js buffers, and how far back the player should flush content.

Calling hls.trigger(Events.BUFFER_FLUSHING, { startOffset: 0, endOffset: 30} ); flushes content from start to end …

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by bennlich
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants