VTTCue: region property
Limited availability
This feature is not Baseline because it does not work in some of the most widely-used browsers.
Thuộc tính region của giao diện VTTCue trả về và đặt VTTRegion mà cue này thuộc về.
Giá trị
Một đối tượng VTTRegion.
Ví dụ
Trong ví dụ sau, một VTTCue mới được tạo, sau đó giá trị của region được in ra console.
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);
Thông số kỹ thuật
| Specification |
|---|
| WebVTT: The Web Video Text Tracks Format> # dom-vttcue-region> |