Instance Property

duration

The duration of the asset.

Declaration

@property(nonatomic, readonly) CMTime duration;

Discussion

If providesPreciseDurationAndTiming is YES, the asset’s precise duration is returned. If providesPreciseDurationAndTiming is NO, a best-available estimate of the duration is returned. You can set the degree of precision required for timing-related properties at initialization time for assets initialized with URLs (see AVURLAssetPreferPreciseDurationAndTimingKey in AVURLAsset).

See Also

Inspecting an Asset

providesPreciseDurationAndTiming

A Boolean value that indicates whether the asset provides precise timing.

creationDate

A value that indicates the creation date of the asset.

naturalSize

The encoded or authored size of the visual portion of the asset.

Deprecated
preferredRate

The natural rate at which the asset is to be played.

preferredTransform

The preferred transform to apply to the visual content of the asset for presentation or processing.

preferredVolume

The preferred volume at which the audible media of the asset is to be played.

preferredDisplayCriteria

The display criteria that define the optimal TV display mode for the asset.

AVDisplayCriteria

An object containing properties that define the display criteria for a media asset.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software