Baseline Widely available
The position
property of the VTTCue
interface represents the indentation of the cue within the line.
A number, or "auto"
representing the indentation of the cue within the line.
In the following example a new VTTCue
is created, then the value of position
is set to 2
. The value is then 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!");
cue1.position = "2";
console.log(cue1.position);
track.addCue(cue1);
Specifications Browser compatibility
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.3