HTML Audio/Video DOM addTextTrack() Method
❮ การอ้างอิง DOM เสียง/วิดีโอ HTML
ตัวอย่าง
เพิ่มแทร็กข้อความใหม่ลงในวิดีโอ:
var
text1 = myVid.addTextTrack("caption");
text1.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 |
ไวยากรณ์
audio|video.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 ซึ่งแสดงถึงแทร็กข้อความใหม่ |
---|
❮ การอ้างอิง DOM เสียง/วิดีโอ HTML