HTML and CSS Reference
In-Depth Information
The text track failed to load.
The mode property can be one of three constant values:
OFF (0)
OFF (0)
The text track is disabled.
The text track is hidden.
The text track is showing.
The TextTrackCueList object is, itself, made up of TextTrackCue objects. Each cue has a
property, track (which is the track the cue is related to), a unique id , and startTime and
endTime properties that reflect the cue's start and end times (in numeric seconds) within the
media resource's timeline. There are also methods that can be used to get the cue source,
both as text ( getCueAsSource ), and HTML ( getCueAsHTML ). In addition, another property,
pauseOnExit , reflects whether the pause-on-exit flag is set, which indicates whether the
playback is to pause when the cue finishes.
Unlike the video and audio tracks, text tracks can be added to the HTMLMediaElement's tex-
tTracks array via three means. How they're added also determines how the tracks are sorted.
The order by which the tracks are sorted is:
1. Text tracks via the track element, in tree order.
2. Text tracks added using the HTMLMediaElement addTextTrack method, mentioned in
Table 4 in Chapter .
3. Text tracks embedded directly in the media resource, in whatever order the media contain-
er specifies.
When browsers implement text tracks, they should provide a means in the control UI by which
users can select which track is to play.
Supposedly Safari has implemented support for tracks embedded in video files. However,
when I tried this with an MP4 video with an embedded captions file in SRT format, Safari
couldn't even play the video—much less show the captions. None of the other browsers have
implemented support for text tracks at this time.
Search WWH ::

Custom Search