Text Tracks JavaScripting

This table lists browser javascripting support for text tracks. We test the following operations:

BrowserTrack attributesCue ChangesCreate tracks
Firefox 20---
Chrome 26yesyesyes
Safari 6yes 1,2yes- 3
Opera 12yesyesyes
Internet Explorer 9---
Internet Explorer 10yes4yes4-
iOS 6 (iPad 4)---
Android 4.2 (Nexus 7)---
  1. Instead of just captions/subtitles, cues of every kind of track are rendered over the video.
  2. Safari uses integers (0,1,2) instead of strings (disabled,showing,hidden) for track modes.
  3. Setting a JavaScript generated track to "showing" consistently crashes the browser.
  4. Server MIME type for text/vtt must be set

See the HTML5 text tracks spec for more information.

Test Setup

This setup contains a video encoded in both WebM and MP4. The video contains four text tracks:

Tracks can be either disabled, hidden or showing. Toggle the mode of a track and see if the list reflects it.

This link adds a text track to the video. It should pop up in the list and contain 7 cues.


Finally, the area to the left shows the active thumbnail cue from the metadata track. Note that cues can only be active if the track is in the hidden or showing mode. Toggle the mode with the link above the video.