Class

AVAssetResourceLoadingRequest

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

Declaration

class AVAssetResourceLoadingRequest : NSObject

Overview

When an AVURLAsset object needs help loading a resource, it asks its AVAssetResourceLoader object to assist. The resource loader encapsulates the request information by creating an instance of this object, which it then hands to its delegate object for processing. The delegate uses the information in this object to perform the request and report on the success or failure of the operation.

Topics

Accessing the Request Data

var request: URLRequest

The URL request object for the resource.

var requestor: AVAssetResourceLoadingRequestor

The asset resource requestor that made the request.

class AVAssetResourceLoadingRequestor

An object that contains information about the originator of a loading request.

func streamingContentKeyRequestData(forApp: Data, contentIdentifier: Data, options: [String : Any]?) -> Data

Obtains key request data for a specific combination of application and content.

let AVAssetResourceLoadingRequestStreamingContentKeyRequestRequiresPersistentKey: String

Specifies whether the content key request requires a persistable key to be returned from the key vendor.

var dataRequest: AVAssetResourceLoadingDataRequest?

The range of requested resource data.

var redirect: URLRequest?

An URL request instance if the loading request was redirected.

Reporting the Result of the Request

var response: URLResponse?

The URL response for the loading request.

func finishLoading(with: URLResponse?, data: Data?, redirect: URLRequest?)

Causes the receiver to finish loading a resource for which a resource loader’s delegate took responsibility .

Deprecated
func finishLoading()

Causes the receiver to treat the processing of the request as complete.

var isCancelled: Bool

A Boolean value that indicates whether the request has been cancelled.

func finishLoading(with: Error?)

Causes the receiver to handle the failure to load a resource for which a resource loader’s delegate took responsibility.

var isFinished: Bool

A Boolean value that indicates whether loading of the resource has finished.

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 AVAssetResourceLoader

An object that mediates resource requests from a URL asset.

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.