Posts

Post not yet marked as solved
0 Replies
530 Views
iOS 13: After downloading an HLS video and its default media selections, can additional media selections be downloaded?For iOS 11 and 12, we allow a user to download HLS video for offline playback using AVAssetDownloadTask. After a video and it's default media selections have fuilly downloaded, the user can choose to download additional media selections using AVAggregateAssetDownloadTask. This code follows most of the Working with HTTP Live Streaming section of the Media Playback Programming Guide. The same AVAggregateAssetDownloadTask running on iOS 13 fails and produces this:Task <A45EEBAE-EE19-4E7D-829D-86A659523637>.<7> finished with error [-1] Error Domain=NSURLErrorDomain Code=-1 "(null)" UserInfo={_NSURLErrorRelatedURLSessionTaskErrorKey=( "BackgroundAVAssetDownloadTask <A45EEBAE-EE19-4E7D-829D-86A659523637>.<7>"Sample code from an article titled Using AVFoundation to Play and Persist HTTP Live Streams demonstrates HLS downloads using only AVAggregateAssetDownloadTask and it works nicely on iOS 11, 12 and 13. The sample demonstrates downloads of preferred media selections along with the HLS video, however, there is nothing which shows how to download additonal media selections after downloading the defaults. Of course, the same code can be modified to download allMediaSelections.What is the correct procedure for downloading a video and a list of media selections on iOS 13? With iOS 13, can additional media selections be downloaded after first using AVAggregateAssetDownloadTask to fetch the video and default media selections? Can anyone confirm that the behavior of AVAggregateAssetDownloadTask (or offline downloading in general) has changed in iOS 13?TIA!Tim
Posted
by tim1961.
Last updated
.