Druh stopy Vlastnost
Příklad
Získejte druh textové stopy:
var x = document.getElementById("myTrack").kind;
Výsledkem x může být:
subtitles
Definice a použití
Vlastnost druh nastavuje nebo vrací hodnotu atributu druh stopy.
Atribut druh určuje druh textové stopy.
Podpora prohlížeče
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
Syntax
Vraťte vlastnost druhu:
trackObject.kind
Nastavte vlastnost druhu:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Hodnoty vlastností
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 |
Technické údaje
Návratová hodnota: | Řetězec představující druh textové stopy |
---|
Další příklady
Příklad
Nastavte druh textové stopy:
document.getElementById("myTrack").kind = "chapters";
Související stránky
HTML reference: HTML atribut druhu <track>
❮ Sledovat objekt