urlSession(_:assetDownloadTask:didResolve:)
Tells the delegate that a download task resolved the media selection to download, including any automatic selections.
Declaration
optional func urlSession(_ session: URLSession, assetDownloadTask: AVAssetDownloadTask, didResolve resolvedMediaSelection: AVMediaSelection)Parameters
- session:
The session the asset download task is on.
- assetDownloadTask:
The task that resolved the media selection.
- resolvedMediaSelection:
The media selection the task resolved.
Discussion
For the best chance of playing back downloaded content without further network I/O, set this selection on the associated AVPlayerItem.