Instance Method


Maps the specified track time through the appropriate time mapping and returns the resulting sample presentation time.


func samplePresentationTime(forTrackTime trackTime: CMTime) -> CMTime



The track time for which a sample presentation time is requested.

Return Value

The sample presentation time corresponding to trackTime; the value will be invalid if trackTime is out of range.

See Also

Finding Track Segments

var segments: [AVAssetTrackSegment]

The time mappings from the track’s media samples to its timeline.

func segment(forTrackTime: CMTime) -> AVAssetTrackSegment?

Returns the track segment that corresponds with, or is closest to, the specified track time.