Contents

duration

A time value that indicates the asset’s duration.

Declaration

var duration: CMTime { get }

Discussion

If you initialized the composition’s assets by passing the AVURLAssetPreferPreciseDurationAndTimingKey initialization option, this property value provides precise duration; otherwise, it provides a best-available estimate. You can determine the value’s accuracy by querying the asset’s providesPreciseDurationAndTiming property.

See Also

Accessing duration and timing