طريقة 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 ، يمثل مسار النص الجديد |
---|
❮ كائن صوتي