Track default property
Example
Get the default state of the track:
var x = document.getElementById("myTrack").default;
x The output result is:
false
Definition and Usage
The default property is used to set or return the default state of the track.
This property reflects
If the default property is used, it specifies that this track should be used, in case the user has not selected another track.
**Note:** There cannot be more than one track element. Each media element's track element can have only one default property. T
Browser support





Internet Explorer, Opera, and Chrome browsers support the srclang property.
**Note:** Firefox, Safari, or Internet Explorer 9 and earlier IE versions do not support the srclang property.
Syntax
Return the default property:
trackObject
.default
Set the default property:
trackObject
.default=true|false
Attribute values
| Value | Description |
|---|---|
| true|false | Tracks the default state of this track
|
Technical Details
| Return Value: | Boolean, representing the default state of the track |
|---|
More examples
Example
Set the default state of the track:
document.getElementById("myTrack").default=true;
Related pages
HTML Reference Manual: HTML
The Track object