HTMLTrackElement

The HTMLTrackElement interface provides access to the properties of <track> elements, as well as methods to manipulate them.

Properties

Inherits properties from its parent, HTMLElement.

Name Type Description
kind DOMString Reflects the kind HTML attribute, indicating how the text track is meant to be used. Possible values are: subtitles, captions, descriptions, chapters, metadata. See kind attribute documentation for details.
src DOMString Reflects the src HTML attribute, indicating the address of the text track data.
srclang DOMString Reflects the srclang HTML attribute, indicating the language of the text track data.
label DOMString Reflects the label HTML attribute, indicating a user-readable title for the track.
default Boolean Reflects the default HTML attribute, indicating that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate.
readyState Read only unsigned short

The readiness state of the track.

Constant Value Description
NONE 0 Indicates that the text track's cues have not been obtained.
LOADING 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.
LOADED 2 Indicates that the text track has been loaded with no fatal errors.
ERROR 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.
track Read only TextTrack The track element's text track data.

Methods

No specific method; inherits methods from its parent, HTMLElement.

Specifications

Specification Status Comment
WHATWG HTML Living Standard
The definition of 'HTMLTrackElement' in that specification.
Living Standard No change from HTML5.
HTML5
The definition of 'HTMLTrackElement' in that specification.
Recommendation Initial definition.

Browser compatibility

Feature Chrome Firefox (Gecko) Internet Explorer Opera Safari (WebKit)
Basic support ? 31.0 (31.0) ? ? ?
Feature Android Firefox Mobile (Gecko) IE Phone Opera Mobile Safari Mobile
Basic support ? 31.0 (31.0) ? ? ?

See also

  • The HTML element implementing this interface: <track>.

 

Document Tags and Contributors

 Contributors to this page: fscholz, rillian, teoli, kscarfone, Sheppy, KyleBarnhart
 Last updated by: fscholz,