HTML DOM Track kind Property
-- Learning is not just about technology, but also about dreams!
- Home
- HTML
- JavaScript
- CSS
- Vue
- React
- Python3
- Java
- C
- C++
- C#
- AI
- Go
- SQL
- Linux
- VS Code
- Bootstrap
- Git
- Local Bookmarks
JavaScript Reference
JavaScript Objects
JavaScript Array Object JavaScript Boolean Object JavaScript Date Object JavaScript Math Object JavaScript Number Object JavaScript String Object JavaScript RegExp Object JavaScript Global Properties/Functions JavaScript Operators JavaScript Error
Browser Objects
Window Object Navigator Object Screen Object History Object Location Object Storage Object
DOM Objects
HTML DOM Document Object HTML DOM Element Object HTML DOM Attribute Object HTML DOM Event Object HTML DOM Console Object CSSStyleDeclaration Object DOM HTMLCollection
HTML Objects
<a> <area> <audio> <base> <blockquote> <body> <button> <canvas> <col> <colgroup> <datalist> <del> <details> <dialog> <embed> <fieldset> <form> <iframe> <frameset > <img> <ins> <input> - button <input> - checkbox <input> - color <input> - date <input> - datetime <input> - datetime-local <input> - email <input> - file <input> - hidden <input> - image <input> - month <input> - number <input> - range <input> - password <input> - radio <input> - reset <input> - search <input> - submit <input> - text <input> - time <input> - url <input> - week <keygen> <link> <label> <legend> <li> <map> <menu> <menuItem> <meta> <meter> <object> <ol> <optgroup> <option> <param> <progress> <q> <script> <select> <source> <style> <table> <td> <th> <tr> <textarea> <title> <time> <track> <video>
Track kind Property
Example
Get the type of the text track:
var x = document.getElementById("myTrack").kind;
x output will be:
subtitles
Definition and Usage
The kind property is used to set or return the value of the kind property of a track.
The kind property describes the kind of text track.
Browser Support
The kind property is supported in Internet Explorer, Opera, and Chrome.
Note: The kind property is not supported in Firefox, Safari, or Internet Explorer 9 and earlier.
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 captions, which are short text summaries that will be displayed in the player. |
| chapters | The track defines chapters, which are used to navigate the media resource. |
| descriptions | The track defines descriptions, which are used to describe the content of the media via audio, if the content is not playable or visible. |
| metadata | The track defines content that is used by scripts. |
| subtitles | The track defines subtitles, which are used to display subtitles in the video. |
Technical Details
| Return Value: | A string, representing the kind of text track |
|---|
More Examples
Example
Set the kind of the text track:
document.getElementById("myTrack").kind="chapters";
Related Pages
HTML Reference: HTML <track> kind Attribute
YouTip