HTML DOM
The default property of the HTMLTrackElement interface represents whether the track will be enabled if the user's preferences do not indicate that another track would be more appropriate. It reflects the track element's boolean default attribute, returning true if present and false otherwise.
Value
A Boolean.
Example
const trackElement = document.getElementById("exampleTrack");
console.log(trackElement.default);
trackElement.default = true;
Specifications
Browser compatibility
See also
- HTMLTrackElement.kind
- HTMLTrackElement.label
来源:MDN Web Docs / Mozilla 贡献者 · 作者与贡献记录 · CC BY-SA 2.5。离线整理了版式、链接和媒体显示。
