Lacak jenis Properti
Contoh
Dapatkan jenis trek teks:
var x = document.getElementById("myTrack").kind;
Hasil dari x bisa menjadi:
subtitles
Definisi dan Penggunaan
Properti kind menetapkan atau mengembalikan nilai atribut kind dari trek.
Atribut kind menentukan jenis trek teks.
Dukungan Peramban
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
Sintaksis
Kembalikan properti jenis:
trackObject.kind
Setel properti jenis:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Nilai properti
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 |
Detail Teknis
Nilai Kembali: | Sebuah String, mewakili jenis trek teks |
---|
Lebih Banyak Contoh
Contoh
Setel jenis trek teks:
document.getElementById("myTrack").kind = "chapters";
Halaman Terkait
Referensi HTML: HTML <track> atribut jenis
Lacak Objek