Contents

tracks(withMediaType:)

Returns tracks that contain media of a specified type.

Declaration

func tracks(withMediaType mediaType: AVMediaType) -> [AVAssetTrack]

Parameters

  • mediaType:

    The media type of the tracks to return.

Return Value

An array of tracks, which is empty if there are no tracks with the media type.

Discussion

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