HTML and CSS Reference
display it on the screen.
the Text Track API.
Table I.3. The Text Track API
The kind of text track, corresponds to the kind attribute.
A human-readable label, corresponds to the label attribute.
The language of the track, such as en-US, corresponds to the srclang attribute.
The mode of the track: DISABLED (the track will not be loaded), HIDDEN
(the track will be loaded but not displayed), or SHOWING (the track will be
loaded and displayed if appropriate).
An array containing the individual cues from the track.
An array containing the cues that apply to the current point in the media.
Add a cue to the cues array.
Remove a cue from the cues array.
The property you need here is the activeCues array, or a set of cues that should be dis-
playing currently. Displaying the text from the active cue of the description track is
as simple as grabbing the first element of the array and using the text property, as shown
in the following listing. Replace the last case in the select statement in listing I.11 with