HTMLTrackElement

The track element allows authors to specify explicit external timed text tracks for media elements. It does not represent anything on its own.

There must not be two track element children of the same media element whose kind attributes are in the same state, whose srclang attributes are both missing or have values that represent the same language, and whose label attributes are again both missing or both have the same value.


Code Example:
<video src=\"brave.webm\">
 <track kind=subtitles src=brave.en.vtt srclang=en label=\"English\">
 <track kind=captions src=brave.en.vtt srclang=en label=\"English for the Hard of Hearing\">
 <track kind=subtitles src=brave.fr.vtt srclang=fr label=\"Français\">
 <track kind=subtitles src=brave.de.vtt srclang=de label=\"Deutsch\">
</video>


Supported Platform(s)

- BlackBerry OS 6.0+
- BlackBerry PlayBook 1.0+
- BlackBerry 10
- Ripple Emulator
View Supported Platform Table
APIBB5.0BB6.0BB7.0PB1.0PB2.0BB10Ripple
document.createElement("track")   Y Y Y Y YY
default   Y Y Y Y YY
kind   Y Y Y Y YY
label   Y Y Y Y YY
src   Y Y Y Y YY
srclang   Y Y Y Y YY

Configuration Document Settings

To use all of the API described for this object, you must ensure the following settings are in your configuration document:

This API does not require a <feature> element to be declared in the configuration document of your BlackBerry WebWorks Application.

Permission Elements (PlayBook and BlackBerry 10+)
This API does not require a <permission> element to be declared in the configuration document of your BlackBerry WebWorks Application.


Properties

Boolean default
String kind
String label
String src
String srclang

Constructors

document.createElement("track")


Creates an HTMLTrackElement


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator


Code Example:
var track = document.createElement("track");

Properties

Boolean default


The default attribute, if specified, indicates that the track is to be enabled if the user's preferences do not indicate that another track would be more appropriate. There must not be more than one track element with the same parent node with the default attribute specified.


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

String kind


kind is one of the following strings "subtitles", "captions", "descriptions", "chapters", "metadata"


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

String label


The label attribute gives a user-readable title for the track. This title is used by user agents when listing subtitle, caption, and audio description tracks in their user interface

The value of the label attribute, if the attribute is present, must not be the empty string.


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

String src


The src attribute gives the address of the text track data. The value must be a valid non-empty URL potentially surrounded by spaces. This attribute must be presen


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

String srclang


The srclang attribute gives the language of the text track data. The value must be a valid BCP 47 language tag. This attribute must be present if the element's kind attribute is in the subtitles state.


Supported Platforms
 - BlackBerry OS 6.0+
 - BlackBerry PlayBook 1.0+
 - BlackBerry 10
 - Ripple Emulator

Documentation generated by JsDoc Toolkit 2.4.0 on Mon Feb 11 2013 14:51:07 GMT-0500 (EST)