MDN self-hosted library · e01.org

VTTCue: region property

WebVTT

Open notebook · 1 cells web-api-instance-property upstream source

WebVTT

The region property of the VTTCue interface returns and sets the VTTRegion that this cue belongs to.

Value

A VTTRegion object.

Examples

In the following example a new VTTCue is created, then the value of region is printed to the console.

let video = document.querySelector("video");
let track = video.addTextTrack("captions", "Captions", "en");
track.mode = "showing";

let cue = new VTTCue(0, 0.9, "Hildy!");
console.log(cue.region);

track.addCue(cue);

Specifications

Browser compatibility