HTMLTrackElement: kind property - Web APIs | MDN
Value
A string; lowercase captions, descriptions, chapters, subtitles or metadata.
Example
Given the following:
html
<track src="track.vtt" id="exampleTrack" />
We get the following results:
js
const trackElement = document.getElementById("exampleTrack");
// missing value
console.log(trackElement.kind); // "subtitles"
trackElement.kind = "INVALID";
// invalid value
console.log(trackElement.kind); // "metadata"
trackElement.kind = "CAPTIONS";
// valid value
console.log(trackElement.kind); // "captions"
Specifications
| Specification |
|---|
| HTML # dom-track-kind |