TrackElement

EventTargetNodeDOMElementElementjs.html.TrackElement (extern class)

The HTMLTrackElement

Documentation HTMLTrackElement by Mozilla Contributors, licensed under CC-BY-SA 2.5.

See:

Static Members

NONE: Int

LOADING: Int

LOADED: Int

ERROR: Int

Instance Members

kind: String

Is a DOMString that reflects the kind HTML attribute, indicating how the text track is meant to be used. Possible values are: subtitles, captions, descriptions, chapters, metadata.


src: String

Is a DOMString that reflects the src HTML attribute, indicating the address of the text track data.


srclang: String

Is a DOMString that reflects the srclang HTML attribute, indicating the language of the text track data.


label: String

Is a DOMString that reflects the label HTML attribute, indicating a user-readable title for the track.


default_: Bool

Is a 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: Int

Returns  an unsigned short that show 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: TextTrack

Returns TextTrack is the track element's text track data.