Contents

duration

A time value that represents the duration of the asset.

Declaration

static var duration: AVAsyncProperty<Root, CMTime> { get }

Discussion

Use the load(_:isolation:) method to retrieve the property value.

If the value of providesPreciseDurationAndTiming is false, the asset returns a best-available estimate of the duration. You can specify your preferred degree of precision for timing-related properties when you create an AVURLAsset by passing a value for the AVURLAssetPreferPreciseDurationAndTimingKey initialization option.

See Also

Loading duration and timing