My app uses AVPlayer for video playback, and now I have a requirement to start pre-loading video content before entering the video playback page.
I want to pre-load as little content as possible, as long as the video can start playing quickly after entering the video playback page. It seems that AVAssetDownloadTask can achieve my requirement, but I encountered several problems
-
How can I control the AVAssetDownloadTask to load only the first few seconds of the video before going to the video playback page?
-
How to bind the first few seconds of the downloaded part of the video to the url , so that I can continue to use the downloaded part to quickly open the video after I restart the app.
-
Does AVAssetDownloadTask support mp4 to achieve the same function?