Instance Method

tracks(withMediaCharacteristic:)

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

Declaration

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

Parameters

mediaCharacteristic

The media characteristic used to filter the asset.

Return Value

An array of AVMutableCompositionTrack objects that contains tracks with the specified media characteristic. Returns an empty array if there are no tracks matching the specified media characteristic.

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 track(withTrackID: CMPersistentTrackID) -> AVMutableCompositionTrack?

Provides a composition track associated with the specified track ID.

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

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