Class

AVAssetResourceLoadingRequest

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

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.

func streamingContentKeyRequestData(forApp: Data, contentIdentifier: Data, options: [String : Any]? = nil)

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

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

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.

Instance Properties

var response: URLResponse?

The URL response for the loading request.

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 for the policies that define the automatic purging of downloaded assets.

class AVAssetDownloadStorageManagementPolicy

A set of properties that defines a policy for the automatic purging of downloaded assets.

class AVMutableAssetDownloadStorageManagementPolicy

A mutable set of properties that defines a policy for the automatic purging of downloaded assets.