Class

AVAssetResourceLoader

An object that mediates resource requests from a URL asset.

Declaration

class AVAssetResourceLoader : NSObject

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.

protocol AVAssetResourceLoaderDelegate

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

Getting the Dispatch Queue

var delegateQueue: DispatchQueue?

The dispatch queue to use when handling resource requests.

Loading Content Keys

var preloadsEligibleContentKeys: Bool

A Boolean value that indicates whether content keys will be loaded as quickly as possible.

Relationships

Inherits From

Conforms To

See Also

Asset Retrieval

class AVURLAsset

A concrete subclass of AVAsset that's used to initialize an asset from a local or remote URL.

class AVAssetDownloadURLSession

A URL session used to support the creation and execution of asset download tasks.

class AVAssetResourceLoadingRequest

An object that encapsulates information about a resource request issued by a resource loader object.

var response: URLResponse?

The URL response for the loading request.

class AVAssetResourceRenewalRequest

An object that encapsulates information about a resource request issued by a resource loader to renew a previously issued request.

class AVAssetResourceLoadingContentInformationRequest

A query used to get essential information about a resource referenced by an asset resource loading request.

class AVAssetResourceLoadingDataRequest

An object used to request data from a resource referenced by an asset resource loading request.

class AVAssetDownloadStorageManager

A manager of policies used to automatically purge downloaded assets.

class AVAssetDownloadStorageManagementPolicy

A set of properties that defines a policy to automatically purge downloaded assets.

class AVMutableAssetDownloadStorageManagementPolicy

A mutable set of properties that defines a policy to automatically purge downloaded assets.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software