Instance Method

add(_:)

Adds an output to the receiver.

Declaration

func add(_ output: AVAssetReaderOutput)

Parameters

output

The reader output to add.

Discussion

Outputs are created with a reference to one or more AVAssetTrack objects. Adding an output to an asset reader indicates to the reader that it should source from those tracks. The tracks must be owned by the asset returned by the reader’s asset property.

You can't add an output after starting reading.

See Also

Managing Outputs

var outputs: [AVAssetReaderOutput]

The outputs from which clients of the reader can read media data.

func canAdd(AVAssetReaderOutput) -> Bool

Returns a Boolean value that indicates whether to add an output to the receiver.