Instance Method

respond(with:)

Provides data to the loading request.

Declaration

func respond(with data: Data)

Parameters

data

An instance of NSData containing some or all of the requested bytes.

Discussion

This method may be invoked multiple times on the same instance of AVAssetResourceLoadingDataRequest to provide the full range of requested data incrementally. Upon each invocation, the value of the currentOffset property is updated to match the amount of data provided.

See Also

Providing Data to a Request

var requestedLength: Int

The length, in bytes, of the data requested.

var requestedOffset: Int64

The position within the resource of the first byte requested.

var currentOffset: Int64

The position within the resource of the next byte.

var requestsAllDataToEndOfResource: Bool

A Boolean value that indicates the entire remaining length of the resource from the offest to the end of the resource is being requested.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software