VTTRegion: VTTRegion() constructor

Limited availability

This feature is not Baseline because it does not work in some of the most widely-used browsers.

Want more browser support for this feature? Tell us why.

The VTTRegion() constructor creates a new VTTRegion object instance.

Syntax

js
new VTTRegion()

Parameters

None.

Return value

A new VTTRegion object.

The properties of the returned object are initialized to the following values:

Examples

js
const region = new VTTRegion();
region.width = 50; // Use 50% of the video width
region.lines = 4; // Use 4 lines of height.

Specifications

Specification
WebVTT: The Web Video Text Tracks Format
# dom-vttregion-vttregion

Browser compatibility