The AVAssetResourceLoaderDelegate protocol defines a method that lets your code handle resource loading requests coming from an AVURLAsset object. You adopt this protocol in an object that you associate with the asset’s resource loader—that is, an instance of the AVAssetResourceLoader class. The resource loader works with your delegate to process the request.Asks the delegate if it wants to load the requested resource.
Instance Method Summary (collapse)
Asks the delegate if it wants to load the requested resource.
Instance Method Details
- (Boolean) resourceLoader(resourceLoader, shouldWaitForLoadingOfRequestedResource:loadingRequest)
Asks the delegate if it wants to load the requested resource. The resource loader object calls this method when assistance is required of your code to load the specified resource. For example, the resource loader might call this method to load decryption keys that have been specified using a custom URL scheme.If you plan to return YES from this method, you must begin loading the resource before doing so. You can load the resource synchronously or asynchronously. In both cases, you must indicate success or failure of the operation by calling the finishLoadingWithResponse:data:redirect: or finishLoadingWithError: method of the request object when you finish. If you load the resource asynchronously, you must also store a strong reference to the object in the loadingRequest parameter before returning from this method.If you return NO from this method, the resource loader treats the loading of the resource as having failed.