Metoda video addTextTrack().
Příklad
Přidejte do videa novou textovou stopu:
var x = document.getElementById("myVideo");
var y = x.addTextTrack("caption");
y.addCue(new TextTrackCue("Test text", 01.000, 04.000, "", "", "", true));
Definice a použití
Metoda addTextTrack() vytvoří a vrátí nový objekt TextTrack.
Nový objekt TextTrack je přidán do seznamu textových stop pro prvek videa.
Podpora prohlížeče
Method | |||||
---|---|---|---|---|---|
addTextTrack() | Not supported | Not supported | Not supported | Not supported | Not supported |
Syntax
videoObject.addTextTrack(kind, label, language)
Hodnoty parametrů
Value | Description |
---|---|
kind | Specifies the kind of text track. Possible values:
|
label | A string specifying the label for the text track. Is used to identify the text track for the users |
language | A two-letter language code that specifies the language of the text track. To view all available language codes, go to our Language code reference |
Technické údaje
Návratová hodnota: | Objekt TextTrack představující novou textovou stopu |
---|
❮ Video objekt