TextTrackList
public protocol TextTrackList : EventDispatcherProtocol
A TextTrackList lists all available TextTrack objects that the player can display.
-
The number of text tracks in the list of text tracks.
Declaration
Swift
var count: Int { get } -
The TextTrack object representing the text track at the index position in the player’s list of text tracks.
Declaration
Swift
func get(_ index: Int) -> TextTrackParameters
indexPosition of the returned TextTrack.
Return Value
The TextTrack at the index position.
-
Returns the TextTrack object representing the text track at the index position in the player’s list of text tracks.
Declaration
Swift
subscript(index: Int) -> TextTrack { get set }Parameters
indexPosition of the returned TextTrack.
Return Value
The TextTrack at the index position.
-
Adds the given event listener of the given TextTrackListEventType.
Remark
When attaching a listener on the wrong object the application will crash.
Declaration
Swift
func addEventListener<E>(type: EventType<E>, listener: @escaping (E) -> ()) -> EventListener where E : EventProtocolParameters
typeTextTrackListEventType of the added event listener.
listenerClosure called when event is dispatched.
Return Value
EventListener that can be removed.
-
Removes the given event listener of the given TextTrackListEventType.
Declaration
Swift
func removeEventListener<E>(type: EventType<E>, listener: EventListener) where E : EventProtocolParameters
typeTextTrackListEventType of the removed event listener.
listenerEventListener object that has been return on addEventListener.
TextTrackList Protocol Reference