Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Typical HLS indexes for streaming contain a rolling set of video files.
The HLS support prior to this was focussed on 'cached streaming': the CDS would connect to an endpoint and cache both the HLS index and all files contained in it before responding with the index to the client. This was simple and ensured a full cache when dealing with multiple clients, but there's a long initial delay / latency, it gave us little control over how the cache is used, and didn't work for samples (where the index contains the full video, potentially Gbs of cache).
This change drops the pre-caching down to only the first file, and adds support for caching while streaming, i.e. if there's a file requested that we don't have in the cache, we can stream it directly to the client while filling the cache for the following client.
Now that we have the byterange support, I also optimized caching for cases where we know the size of the file in advance or the server tells us the content length.
Net effect: