VTTCue: vertical 屬性
VTTCue 介面的 vertical 屬性是一個字串,表示提示(cue)的寫入方向。
值
包含以下值之一的字串:
示例
在以下示例中,建立了一個新的 VTTCue,然後將 vertical 的值設定為 "rl"。然後將該值列印到控制檯。
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.vertical = "rl";
console.log(cue.vertical);
track.addCue(cue);
規範
| 規範 |
|---|
| WebVTT:網頁影片文字軌道格式 # dom-vttcue-vertical |
瀏覽器相容性
載入中…