오디오 addTextTrack() 메서드
예시
오디오에 새 텍스트 트랙 추가:
var x = document.getElementById("myAudio");
var y = x.addTextTrack("caption");
y.addCue(new TextTrackCue("Test text", 01.000, 04.000,"","","",true));
정의 및 사용
addTextTrack() 메서드는 새 TextTrack 개체를 만들고 반환합니다.
새 TextTrack 개체가 오디오 요소의 텍스트 트랙 목록에 추가됩니다.
브라우저 지원
Method | |||||
---|---|---|---|---|---|
addTextTrack() | Not supported | Not supported | Not supported | Not supported | Not supported |
통사론
audioObject.addTextTrack(kind, label, language)
매개변수 값
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 |
기술적 세부 사항
반환 값: | 새 텍스트 트랙을 나타내는 TextTrack 개체 |
---|
❮ 오디오 개체