Track kind Property
Example
Get the kind of text track:
var x = document.getElementById("myTrack").kind;
The result of x could be:
subtitles
Definition and Usage
The kind property sets or returns the value of the kind attribute of the track.
The kind attribute specifies the kind of text track.
Browser Support
| Property | |||||
|---|---|---|---|---|---|
| kind | Yes | 10.0 | Not supported | Not supported | Yes |
Syntax
Return the kind property:
trackObject.kind
Set the kind property:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Property Values
| Value | Description |
|---|---|
| captions | The track defines translation of dialogue and sound effects (suitable for deaf users) |
| chapters | The track defines chapter titles (suitable for navigating the media resource) |
| descriptions | The track defines a textual description of the video content (suitable for blind users) |
| metadata | The track defines content used by scripts. Not visible for the user |
| subtitles | The track defines subtitles, used to display subtitles in a video |
Technical Details
| Return Value: | A String, representing the kind of text track |
|---|
More Examples
Example
Set the kind of text track:
document.getElementById("myTrack").kind = "chapters";
Related Pages
HTML reference: HTML <track> kind attribute
❮ Track Object