Currently, I just pre-fetch by initializing a few AVPlayers. However, I'd like to add a better caching system.
I'm looking for the best way to:
get videos to start playing as possible, while
making sure to minimize re-downloading of videos if a user scrolls away from a video and back to it.
Alternatively, I've explored using AVAssetDownloadTask to download the HLS videos. My issue is that I can't download the full video and then play it - I need to start playing the video as soon as the user scrolls to it, even if it's not done downloading.
Is there a way to start an HLS download with an AVAssetDownloadTask, and then start playing the video while it continues downloading?
Thank you!