HTML DOM Track Object
Track Object
The Track object is a new object in HTML5.
The Track object represents the HTML <track> element.
Accessing Track Object
You can access the <track> element by using getElementById():
var x = document.getElementById("myTrack");
Creating Track Object
You can create a <track> element by using the document.createElement() method:
var x = document.createElement("TRACK");
Track Object Properties
Attributes | Description |
---|---|
default | Sets or returns the default state of the track. |
kind | Sets or returns the value of the kind attribute of the track. |
label | Sets or returns the value of the label attribute of the track. |
readyState | Returns the current state of the track resource. |
src | Sets or returns the value of the src attribute of the track. |
srclang | Sets or returns the value of the srclang attribute of the track. |
track | Returns a TextTrack object representing the text track data of the track element. |
Standard Attributes and Events
Track Object Supports StandardsAttributesAndEvents.
Related Pages
HTML Reference Manual:HTML <track> Tag