Instance Method

track(withTrackID:)

Provides a composition track associated with the specified track ID.

Declaration

func track(withTrackID trackID: CMPersistentTrackID) -> AVMutableCompositionTrack?

Parameters

trackID

The persistent track identifier.

Return Value

An instance of AVMutableCompositionTrack that contains the track associated with the track ID or nil when no track is available.

See Also

Managing Tracks

var tracks: [AVMutableCompositionTrack]

An array of mutable composition tracks contained by the composition.

func removeTrack(AVCompositionTrack)

Removes a specified track from the receiver.

func mutableTrack(compatibleWith: AVAssetTrack) -> AVMutableCompositionTrack?

Returns a track in the receiver into which any time range of a given asset track can be inserted.

func tracks(withMediaCharacteristic: AVMediaCharacteristic) -> [AVMutableCompositionTrack]

Provides the composition tracks of the specified media characteristic associated with an asset.

func tracks(withMediaType: AVMediaType) -> [AVMutableCompositionTrack]

Provides the composition tracks of the specified media type associated with an asset.