Instance Method


Prepares the receiver for obtaining sample buffers from the asset.


func startReading() -> Bool

Return Value

true if the reader is able to start reading, otherwise false.


This method validates the entire collection of settings for outputs for tracks, for audio mixdown, and for video composition and initiates reading of all outputs.

status signals the terminal state of the asset reader, and if a failure occurs, error describes the failure.

See Also

Controlling Reading

var status: AVAssetReader.Status

The status of the reading of sample buffers from the asset.

enum AVAssetReader.Status

The statuses for a reader.

func cancelReading()

Cancels any background work and prevents the receiver’s outputs from reading more samples.

var error: Error?

Describes the error that occurred.

var timeRange: CMTimeRange

The time range to read from the asset.