Track kindProperty
Example
Get the type of text track:
var x = document.getElementById("myTrack").kind;
xThe output result is:
subtitles
Definition and Usage
The kind property is used to set or return the value of the track's kind property.
The kind property describes the type 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"
Property Values
| Value | Description |
|---|---|
| captions | This track defines a short description that will be displayed in the player. |
| chapters | This track defines chapters, used to navigate media resources. |
| descriptions | This track defines descriptions, used to describe the content of media via audio, if 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 captions in the video. |
Technical Details
| Return value: | A string, representing the type of the text track |
|---|
More Examples
Example
Set the type of text track:
document.getElementById("myTrack").kind="chapters";
Related Pages
HTML Reference Manual:HTML <track> kind Attribute
Track Object Other Extensions