Easy Tutorial
❮ Met Console Info Event Form Onsubmit ❯

Track kind Property

Track Object

Example

Get the type of the text track:

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

x outputs:

subtitles

Definition and Usage

The kind property is used to set or return the value of the track's kind attribute.

The kind attribute describes the type of the text track.


Browser Support

Internet Explorer, Opera, and Chrome support the kind property.

Note: Firefox, Safari, or Internet Explorer 9 and earlier versions do not support the kind property.


Syntax

Return the kind property:

Set the kind property:

Property Values

Value Description
captions The track defines short descriptions that are shown in the player.
chapters The track defines chapters, used for navigating the media resource.
descriptions The track defines descriptions, used for describing the media content through audio if the content is not playable or visible.
metadata The track defines content used by scripts.
subtitles The track defines subtitles, used for displaying subtitles in the video.

Technical Details

| Return Value: | String, representing the type of the text track | | --- | --- |


More Examples

Example

Set the type of the text track:

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

Related Pages

HTML Reference: HTML <track> kind Attribute


❮ Met Console Info Event Form Onsubmit ❯