Track defaultProperty
Examples
Get the default state of the track:
xThe output result is:
Definition and Usage
The default property is used to set or return the default state of the track.
This property reflects the <track> default attribute.
If the default attribute is used, it specifies that the track should be used if the user does not select another track.
Note:There cannot be more than one track element. The track elements of each media element can have only one default attribute.
Browser Support
![]()
![]()
![]()
![]()
![]()
Internet Explorer, Opera, and Chrome browsers support the srclang attribute.
Note:Firefox, Safari, or Internet Explorer 9 and earlier IE versions do not support the srclang attribute.
Syntax
Return the default property:
Set the default property:
Property Values
| Value | Description |
|---|---|
| true|false | Specifies the default state of the track
|
Technical Details
| Return Value: | A Boolean value, indicating the default state of the track |
|---|
More Examples
Example
Set the default state of the track:
Related Pages
HTML Reference Manual:HTML <track> default Attribute
Track Object Other Extensions