Contents

timeRange

The time range of the track within the overall timeline of the asset.

Declaration

static var timeRange: AVAsyncProperty<Root, CMTimeRange> { get }

Discussion

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

If the start of the time range is greater than zero, the track doesn’t initially have media data to present. This condition may occur when the media delays an audio track to align the start of audio with a specific video frame. You can test for this as the example below shows:

if track.timeRange.start > .zero {
    // Delayed start.
}

See Also

Loading temporal information