Text tracksBaseline · Widely available
The <track> element is used as a child of the media elements that lets you specify a timed text track to be displayed in parallel with the media element.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1–22Not supported
23+Supportedsince Nov 6, 2012
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–30Not supported
31+Supportedsince Jul 22, 2014
Current: 157Safari
1–5.1Not supported
6+Supportedsince Jul 25, 2012
Current: 27MobileChrome Android
18–18Not supported
25+Supportedsince Feb 27, 2013
Current: 155Firefox Android
4–30Not supported
31+Supportedsince Jul 22, 2014
Current: 157Safari iOS
1–5Not supported
6+Supportedsince Sep 10, 2012
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: addTextTrack.
Feature detection
JS · check before using
if ("TextTrack" in globalThis) {
// TextTrack is available
} else {
// load a polyfill or use a fallback
}Sub-features
Support for each part of the feature (46). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| HTMLMediaElement.addTextTrack | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLMediaElement.textTracks | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.cuechange_event | 32 | 14 | 68 | 10 | 32 | 68 | 10 |
| HTMLTrackElement.default | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.kind | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.label | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.readyState | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.src | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.srclang | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| HTMLTrackElement.track | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| TextTrack | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.activeCues | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.addCue | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.cuechange_event | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.cues | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.id | 33 | 18 | 31 | 8 | 33 | 31 | 8 |
| TextTrack.inBandMetadataTrackDispatchType | ✕ | ✕ | 31 | 8 | ✕ | 31 | 8 |
| TextTrack.kind | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.label | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
Show 26 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| TextTrack.language | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.mode | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrack.removeCue | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.endTime | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.enter_event | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.exit_event | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.id | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.pauseOnExit | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.startTime | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCue.track | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackCueList | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| TextTrackCueList.getCueById | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| TextTrackCueList.length | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| TextTrackList | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackList.addtrack_event | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackList.change_event | 33 | 18 | 31 | 7 | 33 | 31 | 7 |
| TextTrackList.getTrackById | 33 | 18 | 31 | 8 | 33 | 31 | 8 |
| TextTrackList.length | 23 | 12 | 31 | 6 | 25 | 31 | 7 |
| TextTrackList.removetrack_event | 33 | 18 | 31 | 7 | 33 | 31 | 7 |
| track | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| track.default | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| track.kind | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| track.label | 23 | 12 | 31 | 6 | 25 | 31 | 6 |
| track.src | 23 | 12 | 50 | 6 | 25 | 50 | 6 |
| track.srclang | 23 | 12 | 31 | 6 | 25 | 31 | 6 |