Contents

resourceLoader(_:didCancel:)

Informs the delegate that a prior loading request has been cancelled.

Declaration

optional func resourceLoader(_ resourceLoader: AVAssetResourceLoader, didCancel loadingRequest: AVAssetResourceLoadingRequest)

Parameters

  • resourceLoader:

    The resource loader.

  • loadingRequest:

    The loading request that has been cancelled.

Discussion

Previously issued loading requests can be cancelled when data from the resource is no longer required or when a loading request is superseded by new requests for data from the same resource.

For example, if to complete a seek operation it becomes necessary to load a range of bytes that’s different from a range previously requested, the prior request may be cancelled while the delegate is still handling it.

See Also

Processing resource requests