TextTrackList_Objc
@objc(THEOplayerTextTrackList)
public protocol TextTrackList_Objc
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
@objc(get:) func get_Objc(_ index: Int) -> TextTrack_Objc
Parameters
index
Position 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
@discardableResult func addEventListener(type: String, listener: @escaping (TrackEventProtocol_Objc) -> ()) -> EventListener
Parameters
type
TextTrackListEventType of the added event listener.
listener
Closure 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(type: String, listener: EventListener)
Parameters
type
TextTrackListEventType of the removed event listener.
listener
EventListener object that has been return on addEventListener.