MediaTrackList
public protocol MediaTrackList : EventDispatcherProtocol
A MediaTrackList lists all available MediaTrack objects that the player can play. It contains MediaTrack objects, which are either AudioTracks or VideoTracks.
-
The number of media tracks in the list of media tracks.
Declaration
Swift
var count: Int { get }
-
Returns the MediaTrack object representing the media track at the index position in the player’s list of audio or video tracks.
Declaration
Swift
func get(_ index: Int) -> MediaTrack
Parameters
index
Position of the returned MediaTrack.
Return Value
The MediaTrack at the index position.
-
DEPRECATED: Returns the MediaTrack object representing the media track at the index position in the player’s list of audio or video tracks.
Declaration
Swift
@available(*, deprecated, message: "Using subscript is deprecated and will be removed with the next major version. Please use `get(_ index: Int﹚` instead.") subscript(index: Int) -> MediaTrack { get set }
Parameters
index
Position of the returned MediaTrack.
Return Value
The MediaTrack at the index position.