Instance Method

tracksWithMediaType:

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

Declaration

- (NSArray<AVAssetTrack *> *)tracksWithMediaType:(AVMediaType)mediaType;

Parameters

mediaType

The media type according to which the asset filters its tracks. For valid values, see AVMediaType.

Return Value

An array of AVAssetTrack objects of a specific media type.

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.

- tracksWithMediaCharacteristic:

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

- unusedTrackID

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