Método addTextTrack() de áudio
Exemplo
Adicione uma nova faixa de texto ao áudio:
var x = document.getElementById("myAudio");
var y = x.addTextTrack("caption");
y.addCue(new TextTrackCue("Test text", 01.000, 04.000,"","","",true));
Definição e uso
O método addTextTrack() cria e retorna um novo objeto TextTrack.
O novo objeto TextTrack é adicionado à lista de faixas de texto para o elemento de áudio.
Suporte ao navegador
Method | |||||
---|---|---|---|---|---|
addTextTrack() | Not supported | Not supported | Not supported | Not supported | Not supported |
Sintaxe
audioObject.addTextTrack(kind, label, language)
Valores de parâmetro
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 |
Detalhes técnicos
Valor de retorno: | Um objeto TextTrack, representando a nova faixa de texto |
---|
❮ Objeto de áudio