Methods you can implement to handle resource loading requests coming from a URL asset.


protocol AVAssetResourceLoaderDelegate


A class should adopt this protocol when associated with the asset’s resource loader—that is, an instance of the AVAssetResourceLoader class. The resource loader works with your delegate to process the request.


Processing Resource Requests

func resourceLoader(AVAssetResourceLoader, shouldWaitForRenewalOfRequestedResource: AVAssetResourceRenewalRequest) -> Bool

Tells the delegate when assistance is required of the application to renew a resource.

Content Key Types

The types of custom URLs that should be handled as content keys.

func resourceLoader(AVAssetResourceLoader, didCancel: AVAssetResourceLoadingRequest)

Informs the delegate that a prior loading request has been cancelled.

Processing Authentication Challenges

func resourceLoader(AVAssetResourceLoader, didCancel: URLAuthenticationChallenge)

Informs the delegate that a prior authentication challenge has been cancelled.

func resourceLoader(AVAssetResourceLoader, shouldWaitForResponseTo: URLAuthenticationChallenge) -> Bool

Tells the delegate that assistance is required of the application to respond to an authentication challenge.


Inherits From

See Also

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.