HTMLTrackElement interface represents an HTML
<track> element within the DOM. This element can be used as a child of either
<video> to specify a text track containing information such as closed captions or subtitles.
Inherits properties from its parent,
A boolean value reflecting the
defaultattribute, indicating that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate.
unsigned shortthat show the readiness state of the track:
Constant Value Description
0 Indicates that the text track's cues have not been obtained.
1 Indicates that the text track is loading and there have been no fatal errors encountered so far. Further cues might still be added to the track by the parser.
2 Indicates that the text track has been loaded with no fatal errors.
3 Indicates that the text track was enabled, but when the user agent attempted to obtain it, this failed in some way. Some or all of the cues are likely missing and will not be obtained.
TextTrackis the track element's text track data.
No specific method; inherits methods from its parent,
The WebVTT or TTML data describing the actual cues for the text track isn't loaded if the track's
mode is initially in the
disabled state. If you need to be able to perform any processing on the track after the
<track> is set up, you should instead ensure that the track's
mode is either
hidden (if you don't want it to start out being presented to the user) or
showing (to initially display the track). You can then change the mode as desired later.
|HTML Standard (HTML)|
BCD tables only load in the browser
- The HTML element implementing this interface: