iOS Developer Library

Developer

AVFoundation Framework Reference AVAssetResourceLoader Class Reference

Options
Deployment Target:

On This Page
Language:

AVAssetResourceLoader

An AVAssetResourceLoader object mediates resource requests from an AVURLAsset object with a delegate object that you provide. When a request arrives, the resource loader asks your delegate if it is able to handle the request and reports the results back to the asset. More...

Inheritance


Conforms To


Import Statement


import AVFoundation @import AVFoundation;

Availability


Available in iOS 6.0 and later.
  • Sets the delegate and dispatch queue to use with the resource loader.

    Declaration

    Swift

    func setDelegate(_ delegate: AVAssetResourceLoaderDelegate!, queue delegateQueue: dispatch_queue_t!)

    Objective-C

    - (void)setDelegate:(id<AVAssetResourceLoaderDelegate>)delegate queue:(dispatch_queue_t)delegateQueue

    Parameters

    delegate

    The delegate object to query when handling resource requests. You may specify nil if you want to clear the delegate object. The resource loader does not store a strong reference to the delegate object.

    delegateQueue

    The dispatch queue on which to execute resource requests. If the delegate parameter is not nil, this parameter must also not be nil and must contain a valid dispatch queue. However, if delegate is nil, this parameter may also be nil.

    The resource loader maintains a strong reference to the dispatch queue you specify.

    Discussion

    You use this method to specify the object to use when handling resource requests and the dispatch queue on which to process those requests. Resource requests are processed synchronously on the dispatch queue you provide.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.

  • delegate delegate Property

    The delegate object to use when handling resource requests. (read-only)

    Declaration

    Swift

    var delegate: AVAssetResourceLoaderDelegate! { get }

    Objective-C

    @property(nonatomic, readonly) id< AVAssetResourceLoaderDelegate > delegate

    Discussion

    The delegate object is responsible for indicating whether or not it is able to handle a resource request. And for those requests it does handle, the delegate object must initiate the loading of the requested resource.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.

  • The dispatch queue to use when handling resource requests. (read-only)

    Declaration

    Swift

    var delegateQueue: dispatch_queue_t! { get }

    Objective-C

    @property(nonatomic, readonly) dispatch_queue_t delegateQueue

    Discussion

    Resource requests are processed synchronously on the specified dispatch queue.

    Import Statement

    import AVFoundation

    Availability

    Available in iOS 6.0 and later.