new TextTrack(options)
Create an instance of this class.
Parameters:
Name | Type | Default | Description | ||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object | {} | Object of option names and values Properties
|
- See:
Extends
Members
-
activeCues :TextTrackCueList
-
The list text track cues that are currently active for this TextTrack.
-
allowedEvents_
-
cuechange - One or more cues in the track have become active or stopped being active.
-
cues :TextTrackCueList
-
The text track cue list for this TextTrack.
-
readonly default :boolean
-
If this track was set to be on or off by default. Cannot be changed after creation.
-
readonly id :string
-
The id of this track. Cannot be changed after creation.
- Inherited From:
-
readonly kind :string
-
The kind of track that this is. Cannot be changed after creation.
- Inherited From:
-
readonly label :string
-
The label of this track. Cannot be changed after creation.
- Inherited From:
-
readonly language :string
-
The two letter language code for this track. Cannot be changed after creation.
- Inherited From:
-
mode :string
-
Set the mode of this TextTrack to a valid TextTrack~Mode. Will not be set if setting to an invalid mode.
Fires:
-
inner Kind
-
All possible
TextTrackKind
s -
inner Mode
-
All possible
TextTrackMode
s
Methods
-
addCue(cue)
-
Add a cue to the internal list of cues.
Parameters:
Name Type Description cue
TextTrack~Cue The cue to add to our internal list
-
removeCue(removeCue)
-
Remove a cue from our internal list
Parameters:
Name Type Description removeCue
TextTrack~Cue The cue to remove from our internal list
Events
-
modechange
-
An event that fires when mode changes on this track. This allows the TextTrackList that holds this track to act accordingly.
Note: This is not part of the spec!
Type: