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

Browser compatibility

See also

Help improve MDN

Learn how to contribute

This page was last modified on by MDN contributors.