Traccia proprietà gentile
Esempio
Ottieni il tipo di traccia di testo:
var x = document.getElementById("myTrack").kind;
Il risultato di x potrebbe essere:
subtitles
Definizione e utilizzo
La proprietà kind imposta o restituisce il valore dell'attributo kind della traccia.
L'attributo kind specifica il tipo di traccia di testo.
Supporto browser
Property | |||||
---|---|---|---|---|---|
kind | Yes | 10.0 | Not supported | Not supported | Yes |
Sintassi
Restituisci la proprietà gentile:
trackObject.kind
Imposta la proprietà tipo:
trackObject.kind = "captions|chapters|descriptions|metadata|subtitles"
Valori di proprietà
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 |
Dettagli tecnici
Valore di ritorno: | Una stringa, che rappresenta il tipo di traccia di testo |
---|
Altri esempi
Esempio
Imposta il tipo di traccia di testo:
document.getElementById("myTrack").kind = "chapters";
Pagine correlate
Riferimento HTML: attributo tipo HTML <traccia>
❮ Traccia oggetto