web api instance property
VTTCue: region property
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
SpecificationsStandards references are available on the canonical MDN page.
Browser compatibility
Browser compatibilityCompatibility data is available on the canonical MDN page.