VTTCue: lineAlign-Eigenschaft
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Die lineAlign
-Eigenschaft der VTTCue
-Schnittstelle repräsentiert die Ausrichtung dieses VTT-Cues.
Wert
Beispiele
Im folgenden Beispiel wird ein neues VTTCue
erstellt, dann wird der Wert von lineAlign
auf "center"
gesetzt. Der Wert wird dann in die 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!");
cue.lineAlign = "center";
console.log(cue.lineAlign);
track.addCue(cue);
Spezifikationen
Specification |
---|
WebVTT: The Web Video Text Tracks Format # dom-vttcue-linealign |