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) -> BoolParameters
- resourceLoader:
The resource loader.
- renewalRequest:
An instance of
AVAssetResourceRenewalRequestthat 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.