coderef

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: 155
Edge
12–18Not supported
79+Supportedsince Jan 15, 2020
Current: 154
Firefox
1–30Not supported
31+Supportedsince Jul 22, 2014
Current: 157
Safari
1–5.1Not supported
6+Supportedsince Jul 25, 2012
Current: 27
MobileChrome Android
18–18Not supported
25+Supportedsince Feb 27, 2013
Current: 155
Firefox Android
4–30Not supported
31+Supportedsince Jul 22, 2014
Current: 157
Safari iOS
1–7Not supported
8+Supportedsince Sep 17, 2014
Current: 27

How 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
}

Sub-features

Support for each part of the feature (6). The overall table above shows when the whole feature works.

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
VTTCue.align237931625318
VTTCue.line237931625318
VTTCue.position237931625318
VTTCue.size237931625318
VTTCue.snapToLines237931625318
VTTCue.vertical237931625318