WebVTT cue settingsBaseline · Widely available
The VTTCue API updates various aspects of cues dynamically, such as alignment, size and position.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jan 15, 2020. Widely available since Jul 15, 2022.
Browser support
DesktopChrome
1–22Not supported
23+Supportedsince Nov 6, 2012
Current: 155Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
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: align.
Feature detection
JS · check before using
if ("VTTCue" in globalThis && "align" in VTTCue.prototype) {
// VTTCue.align is available
}Documentation (MDN)
Specification
Sub-features
Support for each part of the feature (6). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| VTTCue.align | 23 | 79 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.line | 23 | 79 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.position | 23 | 79 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.size | 23 | 79 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.snapToLines | 23 | 79 | 31 | 6 | 25 | 31 | 8 |
| VTTCue.vertical | 23 | 79 | 31 | 6 | 25 | 31 | 8 |