coderef

WebVTT regionsLimited availability

WebVTT regions set the areas of the video where captions or subtitles should be rendered, such as placing roll-up captions used for live captions.

Not yet supported in all major browsers — check the table and provide a fallback.

Browser support

DesktopChrome
✕Not supportedup to 155
Current: 155
Edge
✕Not supportedup to 154
Current: 154
Firefox
1–58Not supported
59+Supportedsince Mar 13, 2018
Current: 157
Safari
1–14Not supported
14.1+Supportedsince Apr 26, 2021
Current: 27
MobileChrome Android
✕Not supportedup to 155
Current: 155
Firefox Android
4–58Not supported
59+Supportedsince Mar 13, 2018
Current: 157
Safari iOS
1–14Not supported
14.5+Supportedsince Apr 26, 2021
Current: 27

How to use

Not supported in Chrome, Edge, Chrome Android. Use feature detection below and provide a fallback (or a polyfill) for those browsers.

Example

Full syntax and examples are on MDN: region.

Feature detection

JS · check before using
if ("VTTRegion" in globalThis) {
  // VTTRegion is available
} else {
  // load a polyfill or use a fallback
}

Sub-features

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

Sub-featureChromeEdgeFirefoxSafariChrome AndroidFirefox AndroidSafari iOS
VTTCue.region✕✕5914.1✕5914.5
VTTRegion✕✕597✕597
VTTRegion.VTTRegion✕✕597✕597
VTTRegion.id✕✕597✕597
VTTRegion.lines✕✕5912.1✕5912.2
VTTRegion.regionAnchorX✕✕597✕597
VTTRegion.regionAnchorY✕✕597✕597
VTTRegion.scroll✕✕597✕597
VTTRegion.viewportAnchorX✕✕597✕597
VTTRegion.viewportAnchorY✕✕597✕597
VTTRegion.width✕✕597✕597