Objet de piste HTML DOM
Suivre l'objet
L'objet Track représente un élément HTML <track>.
Accéder à un objet de piste
Vous pouvez accéder à un élément <track> en utilisant getElementById() :
var x = document.getElementById("myTrack");
Créer un objet de piste
Vous pouvez créer un élément <track> en utilisant la méthode document.createElement() :
var x = document.createElement("TRACK");
Suivre les propriétés de l'objet
Property | Description |
---|---|
default | Sets or returns the default state of the track |
kind | Sets or returns the value of the kind attribute of the track |
label | Sets or returns the value of the label attribute of the track |
readyState | Returns the current state of the track resource |
src | Sets or returns the value of the src attribute of the track |
srclang | Sets or returns the value of the srclang attribute of the track |
track | Returns a TextTrack object representing the track element's text track data |
Propriétés et événements standard
L'objet Track prend également en charge les propriétés et les événements standard .
Pages connexes
Référence HTML : balise HTML <track>