Theo dõi tài sản loại
Thí dụ
Nhận loại theo dõi văn bản:
var x = document.getElementById("myTrack").kind;
Kết quả của x có thể là:
subtitles
Định nghĩa và Cách sử dụng
Thuộc tính loại đặt hoặc trả về giá trị của thuộc tính loại của bản nhạc.
Thuộc tính kind chỉ định loại bản nhạc văn bản.
Hỗ trợ trình duyệt
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
Cú pháp
Trả lại tài sản tử tế:
trackObject.kind
Đặt thuộc tính loại:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Giá trị tài sản
Value | Description |
---|---|
captions | The track defines translation of dialogue and sound effects (suitable for deaf users) |
chapters | The track defines chapter titles (suitable for navigating the media resource) |
descriptions | The track defines a textual description of the video content (suitable for blind users) |
metadata | The track defines content used by scripts. Not visible for the user |
subtitles | The track defines subtitles, used to display subtitles in a video |
Chi tiết kỹ thuật
Giá trị trả lại: | Một chuỗi, đại diện cho loại bản nhạc văn bản |
---|
Các ví dụ khác
Thí dụ
Đặt loại theo dõi văn bản:
document.getElementById("myTrack").kind = "chapters";
Các trang liên quan
Tham chiếu HTML: Thuộc tính HTML <track> kind
❮ Đối tượng theo dõi