WebVTTBaseline · Widely available
WebVTT is a captions and subtitles format. WebVTT files are loaded using the <track> element, and the VTTCue API can be used to create or update cues dynamically.
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–7Not supported
8+Supportedsince Sep 17, 2014
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: VTTCue.
Feature detection
JS · check before using
if ("VTTCue" in globalThis) {
// VTTCue is available
} else {
// load a polyfill or use a fallback
}Documentation (MDN)
Specification
Usage share
Sub-features
Support for each part of the feature (7). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| VTTCue | 23 | 12 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.VTTCue | 33 | 79 | 31 | 8 | 33 | 31 | 8 |
| VTTCue.getCueAsHTML | 23 | 12 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.text | 23 | 12 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.text.all_html_character_references | 63 | 79 | 127 | 17.5 | 63 | 127 | 17.5 |
| cue | 26 | 79 | 55 | 7 | 26 | 55 | 7 |
| cue.selector_argument | 26 | 79 | ✕ | 7 | 26 | ✕ | 7 |