Javascript Reference - HTML DOM Track Object








The Track object represents an HTML <track> element.

Example

We can access a <track> element by using getElementById().

var x = document.getElementById('myTrack');

We can create a <track> element by using the document.createElement() method.

var x = document.createElement('TRACK');

Track Object Properties

Property Description
default Sets or gets the default state of the track
kind Sets or gets the kind attribute of the track
label Sets or gets the label attribute of the track
readyState Returns the current state of the track resource
src Sets or gets the src attribute of the track
srclang Sets or gets the srclang attribute of the track
track Returns a TextTrack object representing the track element's text track data




Standard Properties and Events

The Track object supports the standard properties and events.