Instance Method

resourceLoader(_:shouldWaitForRenewalOfRequestedResource:)

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

Declaration

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

Parameters

resourceLoader

The resource loader.

renewalRequest

An instance of AVAssetResourceRenewalRequest that provides information about the requested resource.

Return Value

true if the delegate can renew the resource; otherwise false.

Discussion

Delegates receive this message when assistance is required to renew a resource previously loaded by resourceLoader(_:shouldWaitForLoadingOfRequestedResource:). For example, this method is invoked to for decryption keys that require renewal, as indicated in a response to a prior invocation of resourceLoader(_:shouldWaitForLoadingOfRequestedResource:).

If the result is true, the resource loader expects invocation, either subsequently or immediately, of either the AVAssetResourceRenewalRequest method finishLoading or finishLoadingWithError:. If you intend to finish loading the resource after your handling of this message returns, you must retain the renewalRequest until after loading is finished.

If the result is false, the resource loader treats the loading of the resource as having failed.

See Also

Processing Resource Requests

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.

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