VTTCue.region
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 cue1 = new VTTCue(0, 0.9, 'Hildy!');
console.log(cue1.region);
track.addCue(cue1);
Specifications
| Specification |
|---|
| WebVTT: The Web Video Text Tracks Format # dom-vttcue-region |
Browser compatibility
BCD tables only load in the browser