Instance Property

supportsRandomAccess

A Boolean value that indicates whether the asset reader output supports reconfiguration of the time ranges.

Declaration

var supportsRandomAccess: Bool { get set }

Discussion

When the value of this property is true, the time ranges read by the asset reader output can be reconfigured during reading using the reset(forReadingTimeRanges:) method. This also prevents the attached AVAssetReader instance from progressing to AVAssetReader.Status.completed until markConfigurationAsFinal() has been invoked.

The default value is false, which means that the asset reader output may not be reconfigured once reading has begin. When the value of this property is false, the AVAssetReader instance may be able to read media data more efficiently, particularly when multiple asset reader outputs are attached.

This property may not be set after startReading() has been called on the attached asset reader.

See Also

Configuring Reading Settings

func markConfigurationAsFinal()

Informs the receiver not to continue reconfiguring the time ranges, and allows the attached asset reader to change its status to completed.

func reset(forReadingTimeRanges: [NSValue])

Restarts reading with a new set of time ranges.