Track kind property
Example
Get the type of the text track:
var x = document.getElementById("myTrack").kind;
x The output result is:
subtitles
Definition and Usage
The kind property is used to set or return the value of the kind property of the track.
The kind property describes the kind of the text track.
Browser support





Internet Explorer, Opera, and Chrome browsers support the kind property.
**Note:** Firefox, Safari, or Internet Explorer 9 and earlier IE versions do not support the kind property.
Syntax
Return the kind property:
trackObject
.kind
Set the kind property:
trackObject
.kind="captions|chapters|descriptions|metadata|subtitles"
Attribute values
| Value | Description |
|---|---|
| captions | This track defines a brief description to be displayed in the player. |
| chapters | This track defines chapters, used for navigating the media resource. |
| descriptions | This track defines descriptions, used to describe the media content through audio, in case the content cannot be played or is not visible. |
| metadata | This track defines content used by scripts. |
| subtitles | This track defines subtitles, used to display subtitles in the video. |
Technical Details
| Return Value: | String, representing the kind of the text track |
|---|
More examples
Example
Set the kind of the text track:
document.getElementById("myTrack").kind="chapters";
Related pages
HTML Reference Manual: HTML
The Track object