HTML အကိုးအကား

အက္ခရာဖြင့် HTML HTML အမျိုးအစားအလိုက် HTML Browser ပံ့ပိုးမှု HTML အရည်အချင်းများ HTML ကမ္ဘာလုံးဆိုင်ရာ အရည်အချင်းများ HTML ပွဲများ HTML အရောင်များ HTML Canvas HTML အသံ/ဗီဒီယို HTML အက္ခရာအစုံများ HTML Doctypes HTML URL ကုဒ် HTML ဘာသာစကားကုဒ်များ HTML နိုင်ငံကုဒ်များ HTTP မက်ဆေ့ခ်ျများ HTTP နည်းလမ်းများ PX မှ EM Converter ကီးဘုတ်ဖြတ်လမ်းများ


HTML အသံ/ဗီဒီယို DOM textTracks ပိုင်ဆိုင်မှု

❮ HTML အသံ/ဗီဒီယို DOM ရည်ညွှန်းချက်

ဥပမာ

ရနိုင်သော စာသားတေးသွားအရေအတွက်ကို ရယူပါ-

var vid = document.getElementById("myVideo");
alert(vid.textTracks.length);

အဓိပ္ပါယ်နှင့် အသုံးပြုမှု

textTracks ပိုင်ဆိုင်မှုသည် TextTrackList အရာဝတ္တုကို ပြန်ပေးသည်။

TextTrackList အရာဝတ္ထုသည် အသံ/ဗီဒီယိုအတွက် ရနိုင်သော စာသားလမ်းကြောင်းများကို ကိုယ်စားပြုသည်။

ရရှိနိုင်သော စာသားလမ်းကြောင်းတစ်ခုစီကို TextTrack Object တစ်ခုဖြင့် ကိုယ်စားပြုသည်။


Browser ပံ့ပိုးမှု

ဇယားရှိ နံပါတ်များသည် ပိုင်ဆိုင်မှုကို အပြည့်အဝထောက်ခံသည့် ပထမဆုံးဘရောက်ဆာဗားရှင်းကို သတ်မှတ်ပေးသည်။

Property
textTracks Yes 10.0 33.0 6.0 Yes

အထားအသို

audio|video.textTracks

တန်ဖိုးကို ပြန်ပေးသည်။

Type Description
TextTrackList Object Represents the available text tracks for the the audio/video.

TextioTrackList Object:

  • length - get the number of text tracks available in the audio/video
  • [index] - get TextTrack object by index

Note: The first available TextTrack object is index 0

TextTrack Object Represents an text track.

TextTrack Object Properties:

  • kind - get the type of the text track (can be: "subtitles", "caption", "descriptions", "chapters", or "metadata")
  • label - get the label of the text track
  • language - get the language of the text track
  • mode - get or set if the track is active ("disabled"|"hidden"|"showing")
  • cues - get a list of cues as a TextTrackCueList object
  • activeCues - get the currently active text track cues as a TextTrackCueList object
  • addCue(cue) - add a cue to the list of cues
  • removeCue(cue) - remove a cue from the list of cues

❮ HTML အသံ/ဗီဒီယို DOM ရည်ညွှန်းချက်