Contents

AVURLAssetPreferPreciseDurationAndTimingKey

A Boolean value that indicates whether the asset should provide accurate duration and precise random access by time.

Declaration

let AVURLAssetPreferPreciseDurationAndTimingKey: String

Discussion

Setting a value of true indicates longer loading times are acceptable in cases where you require precise timing. Container formats like QuickTime and MPEG-4 provide sufficient timing information and don’t require additional parsing to retrieve it. Other formats don’t provide sufficient summary information, and the system can’t accurately calculate the resource’s duration and timing without examining the media content.

If you only intend to play the asset, the default value of false is sufficient because AVPlayer supports approximate random access by time when full precision isn’t available. If you intend to insert the asset into AVMutableComposition or AVMutableMovie, precise random access is typically desirable, and you should set this option to true.

See Also

Options