Track kind attribute

Definition and usage

kind Attribute settings or return the kind attribute value of the track.

The HTML kind attribute specifies the type of text track.

See also:

HTML Reference Manual:HTML <track> kind Attribute

Instance

Example 1

Get the type of text track:

var x = document.getElementById("myTrack").kind;

The result of x may be:

subtitles

Example 2

Set the type of text track:

document.getElementById("myTrack").kind = "chapters";

Syntax

Return the kind attribute:

trackObject.kind

Set the kind attribute:

trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"

Attribute value

Value Description
captions Translation of track definition dialog and sound effects (suitable for deaf users).
chapters Chapter definition section title (suitable for navigation media resources).
descriptions Track defines the textual description of video content (suitable for blind users).
metadata Track defines the content used by scripts. Not visible to users.
subtitles Track defines subtitles, used to display subtitles in videos.

Technical Details

Return Value: String value representing the type of text track.

Browser Support

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Supported 10.0 Not Supported Not Supported Supported