setDelegate(_:queue:)
Sets the delegate and dispatch queue to use with the resource loader.
Declaration
func setDelegate(_ delegate: (any AVAssetResourceLoaderDelegate)?, queue delegateQueue: dispatch_queue_t?)Parameters
- delegate:
The delegate object to query when handling resource requests. You may specify
nilif 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
delegateparameter is notnil, this parameter must also not beniland must contain a valid dispatch queue. However, ifdelegateisnil, this parameter may also benil.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.