{{APIRef}}
The HTMLTrackElement
interface provides access to the properties of {{HTMLElement("track")}} elements, as well as methods to manipulate them.
Properties
Inherits properties from its parent, {{domxref("HTMLElement")}}.
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
kind | {{domxref("DOMString")}} | Reflects the {{htmlattrxref("kind", "track")}} HTML attribute, indicating how the text track is meant to be used. Possible values are: subtitles, captions, descriptions, chapters, metadata. See {{htmlattrxref("kind", "track")}} attribute documentation for details. | |||||||||||||||
src | {{domxref("DOMString")}} | Reflects the {{htmlattrxref("src", "track")}} HTML attribute, indicating the address of the text track data. | |||||||||||||||
srclang | {{domxref("DOMString")}} | Reflects the {{htmlattrxref("srclang", "track")}} HTML attribute, indicating the language of the text track data. | |||||||||||||||
label | {{domxref("DOMString")}} | Reflects the {{htmlattrxref("label", "track")}} HTML attribute, indicating a user-readable title for the track. | |||||||||||||||
default | {{domxref("Boolean")}} | Reflects the {{htmlattrxref("default", "track")}} 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 {{ReadOnlyInline}} | unsigned short |
The readiness state of the track.
|
|||||||||||||||
track {{ReadOnlyInline}} | {{Domxref("TextTrack")}} | The track element's text track data. |
Methods
No specific method; inherits methods from its parent, {{domxref("HTMLElement")}}.
Specifications
Specification | Status | Comment |
---|---|---|
{{SpecName('HTML WHATWG', "the-video-element.html#the-track-element", "HTMLTrackElement")}} | {{Spec2('HTML WHATWG')}} | No change from {{SpecName("HTML5 W3C")}}. |
{{SpecName('HTML5 W3C', "embedded-content-0.html#the-track-element", "HTMLTrackElement")}} | {{Spec2('HTML5 W3C')}} | Initial definition. |
Browser compatibility
{{CompatibilityTable}}
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatGeckoDesktop("28.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | {{CompatUnknown}} | {{CompatGeckoMobile("28.0")}} | {{CompatUnknown}} | {{CompatUnknown}} | {{CompatUnknown}} |
See also
- The HTML element implementing this interface: {{ HTMLElement("track") }}.