The kind
attribute on a <track> tag specifies the type, or kind, of text track.
Video and audio tracks can be subtitles, captions, descriptions, and others.
A kind
attribute on a <track> element.
The video track contains subtitles in Spanish.
<video controls="controls" width="320" height="176">
<source src="/media/godfather.mp4" type="video/mp4" />
<source src="/media/godfather.ogg" type="video/ogg" />
<track src="/media/godfather.srt" kind="subtitles" srclang="es" label="Spanish" />
</video>
The kind
attribute specifies what type, or kind, the text track is.
Text tracks can be used as subtitles, captions, descriptions, chapters, and others.
<track src="URL" kind="subtitles | captions | descriptions | chapters | metadata">
Note: The kind
attribute requires that the src attribute has a URL value.
Value | Description |
---|---|
subtitles | Specifies subtitles for the media source. |
captions | Specifies translation of dialogues and sound effects. |
descriptions | Specifies textual descriptions of the media source. |
chapters | Specifies chapter titles used for navigating the media source. |
metadata | Specifies a track used by scripts. Not visible to users. |
Here is when kind
support started for each browser:
Chrome
|
23.0 | Nov 2012 |
Firefox
|
31.0 | Jul 2014 |
IE/Edge
|
10.0 | Sep 2012 |
Opera
|
12.1 | Nov 2012 |
Safari
|
6.0 | Jul 2012 |
Back to <track>