VTTCue: region-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die region
-Eigenschaft der VTTCue
-Schnittstelle gibt die VTTRegion
zurück und setzt sie, zu welcher diese Cue gehört.
Wert
Ein VTTRegion
-Objekt.
Beispiele
Im folgenden Beispiel wird eine neue VTTCue
erstellt, und dann wird der Wert von region
in der Konsole ausgegeben.
js
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);
Spezifikationen
Specification |
---|
WebVTT: The Web Video Text Tracks Format> # dom-vttcue-region> |
Browser-Kompatibilität
Loading…