HTML Audio/Video DOM metoda addTextTrack().
❮ HTML Audio/Video DOM Reference
Příklad
Přidejte do videa novou textovou stopu:
var
text1 = myVid.addTextTrack("caption");
text1.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 audio/video.
Podpora prohlížeče
Method | |||||
---|---|---|---|---|---|
addTextTrack() | Not supported | Not supported | Not supported | Not supported | Not supported |
Syntax
audio|video.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, který představuje novou textovou stopu |
---|
❮ HTML Audio/Video DOM Reference