Class

AVAssetResourceLoader

An AVAssetResourceLoader object mediates resource requests from an AVURLAsset object with a delegate object that you provide. When a request arrives, the resource loader asks your delegate if it is able to handle the request and reports the results back to the asset.

Overview

You do not create resource loader objects yourself. Instead, you retrieve a resource loader from the resourceLoader property of an AVURLAsset object and use it to assign your custom delegate object.

The delegate you associate with this object must adopt the AVAssetResourceLoaderDelegate protocol. For more information, see AVAssetResourceLoaderDelegate.

The AVARLDelegateDemo demonstrates using this class in a streaming environment.

Topics

Accessing the Delegate

func setDelegate(AVAssetResourceLoaderDelegate?, queue: DispatchQueue?)

Sets the delegate and dispatch queue to use with the resource loader.

var delegate: AVAssetResourceLoaderDelegate?

The delegate object to use when handling resource requests.

Getting the Dispatch Queue

var delegateQueue: DispatchQueue?

The dispatch queue to use when handling resource requests.

Relationships

Inherits From

Conforms To