JavaScript media object method: addTextTrack()
[this page | pdf | back links]
The addTextTrack() method of the JavaScript
DOM object
corresponding to HTML media
elements (i.e. <audio>
and <video>
elements) adds a new text track to the media. It is not currently supported by
many major browsers.
It has the following
syntax with the following parameters.
object.addTextTrack(kind, label, language)
Parameter
|
Required / Optional
|
Description
|
kind
|
Required
|
Kind of track being
added. Possible values include:
-
subtitles
-
caption
-
descriptions
-
chapters
-
metadata
|
label
|
Optional
|
String specifying track
label for users
|
language
|
Optional
|
Two-letter language
code
|
NAVIGATION LINKS
Contents | Prev | Next | JavaScript DOM (and BOM)