Instance Method

tracksWithMediaCharacteristic:

Returns an array of asset tracks associated with an asset for the specified characteristic.

Declaration

- (NSArray<AVAssetTrack *> *)tracksWithMediaCharacteristic:(AVMediaCharacteristic)mediaCharacteristic;

Parameters

mediaCharacteristic

The media characteristic according to which receiver filters its asset tracks. For valid values, see AVMediaCharacteristic.

Return Value

An array of AVAssetTrack objects of a specific media characteristic, or an empty array if no tracks with the specified characteristic are available.

Discussion

You can call this method without blocking when the data in the tracks property is already loaded.

See Also

Accessing Tracks

tracks

The collection of all tracks contained by the asset.

trackGroups

An array containing all of the track groups in the asset.

- trackWithTrackID:

Returns the track associated with a specified track identifier.

- tracksWithMediaType:

Returns an array of asset tracks associated with an asset for the specified media type.

- unusedTrackID

Returns an ID that's unused by any of the tracks in the asset.