Control AVPlayer stream buffer size for completely offline playback

I am doing CMAF/HLS video streaming on AVPlayer. The player downloads the future .ts/.cmfv chunks during buffering, but after a certain number of downloads, if I seek back to the start, it redownloads the chunks, which is unlike the web where all the chunks are taken from the cache due to bigger cache size. How do I increase the buffer size so that I can cache the entire video, the size of which is around 90-100MB?

I tried using the oft-mentioned preferredForwardBufferedDuration property, but it just changes the number of chunk calls for the future, but if I get back to the start after a long enough playback time, it re-downloads the stream chunks all the same.

Add a Comment

Replies

Do you found any solution for this please share.

We're also looking for information on this. Our use case would be to decrease the CDN load for short seeks (the last 5 minutes) by keeping about 5 min of history on live streams. Currently it re-downloads every time.