TextTrack
Supported Platform(s)
- BlackBerry OS 6.0+ |
- BlackBerry PlayBook 1.0+ |
- BlackBerry 10 |
- Ripple Emulator |
API | BB5.0 | BB6.0 | BB7.0 | PB1.0 | PB2.0 | BB10 | Ripple |
---|---|---|---|---|---|---|---|
activeCues | Y | Y | Y | Y | Y | Y | |
cues | Y | Y | Y | Y | Y | Y | |
kind | Y | Y | Y | Y | Y | Y | |
label | Y | Y | Y | Y | Y | Y | |
language | Y | Y | Y | Y | Y | Y | |
mode | Y | Y | Y | Y | Y | Y | |
readyState | Y | Y | Y | Y | Y | Y | |
NONE | Y | Y | Y | Y | Y | Y | |
LOADING | Y | Y | Y | Y | Y | Y | |
LOADED | Y | Y | Y | Y | Y | Y | |
ERROR | Y | Y | Y | Y | Y | Y | |
OFF | Y | Y | Y | Y | Y | Y | |
HIDDEN | Y | Y | Y | Y | Y | Y | |
SHOWING | Y | Y | Y | Y | Y | Y | |
oncuechange | Y | Y | Y | Y | Y | Y | |
onenter | Y | Y | Y | Y | Y | Y | |
onerror | Y | Y | Y | Y | Y | Y | |
onexit | Y | Y | Y | Y | Y | Y | |
onload | Y | Y | Y | Y | Y | Y |
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. |
Events
void | oncuechange |
void | onenter |
void | onerror |
void | onexit |
void | onload |
Properties
TextTrackCueList | activeCues |
TextTrackCueList | cues |
String | kind |
String | label |
String | language |
Number|TextTrack.OFF|TextTrack.HIDDEN|TextTrack.SHOWING | mode |
Number|TextTrack.NONE|TextTrack.LOADING|TextTrack.LOADED|TextTrack.ERROR | readyState |
Events
void
oncuechange
(event : Event)
When the current playback position of a media element changes fire an oncuechange event for affected track if the text cue becomes active.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
event |
void
onenter
(event : Event)
Fire the onenter event if the current position now includes this text cue.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
event |
void
onerror
(event : Event)
Fire the onerror event if an error has occured with this TextTrack. For example loading has failed.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
event |
void
onexit
(event : Event)
Fire the onexit event if the current position no longer includes this text cue.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
event |
void
onload
(event : Event)
Fire the onload if the TextTrack has loaded.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Parameters | |
---|---|
event |
Properties
readonly
TextTrackCueList
activeCues
If the text track mode of the text track that the TextTrack object represents is not the text track disabled mode, then the activeCues attribute must return a live TextTrackCueList object that represents the subset of the text track list of cues of the text track that the TextTrack object represents whose active flag was set when the script started, in text track cue order. Otherwise, it must return null. When an object is returned, the same object must be returned each time.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
readonly
TextTrackCueList
cues
If the text track mode of the text track that the TextTrack object represents is not the text track disabled mode, then the cues attribute must return a live TextTrackCueList object that represents the subset of the text track list of cues of the text track that the TextTrack object represents whose start times occur before the earliest possible position when the script started, in text track cue order. Otherwise, it must return null. When an object is returned, the same object must be returned each time.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
readonly
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 |
readonly
String
label
text track label
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
readonly
String
language
Language of the text track.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Number | TextTrack.OFF | TextTrack.HIDDEN | TextTrack.SHOWING
mode
The mode attribute, on getting, must return the numeric value corresponding to the text track mode of the text track that the TextTrack object represents.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
readonly
Number | TextTrack.NONE | TextTrack.LOADING | TextTrack.LOADED | TextTrack.ERROR
readyState
The readyState attribute must return the numeric value corresponding to the text track readiness state of the text track
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
Constants
static
Number
NONE
The text track not loaded state.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
static
Number
LOADING
The text track loading state.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
static
Number
LOADED
The text track loaded state.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
static
Number
ERROR
The text track failed to load state.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |
static
Number
OFF
The text track disabled mode.
Supported Platforms | |
---|---|
- BlackBerry OS 6.0+ | |
- BlackBerry PlayBook 1.0+ | |
- BlackBerry 10 | |
- Ripple Emulator |