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


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.


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.

var response: URLResponse?

The URL response for the loading request.

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.


Inherits From

Conforms To