tracks(withMediaType:)
Returns tracks that contain media of a specified type.
Declaration
func tracks(withMediaType mediaType: AVMediaType) -> [AVMutableCompositionTrack]Parameters
- mediaType:
The media type of the tracks to return.
Return Value
An array of composition tracks, which is empty if there are no matching tracks.
Discussion
Apple discourages using this method. Load tracks asynchronously using loadTracks(withMediaType:completionHandler:) instead.