AVAssetResourceLoaderDelegate Protocol Reference
Available in iOS 6.0 and later.
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.
Processing Resource Requests
Asks the delegate if it wants to load the requested resource.
The resource loader object that is making the request.
The loading request object that contains information about the requested resource.
YES if your delegate can load the resource specified by the loadingRequest parameter or
NO if it cannot.
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
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.
- Available in iOS 6.0 and later.
© 2012 Apple Inc. All Rights Reserved. (Last updated: 2012-09-19)