Video videoTracks attribute

definition and usage

videoTracks Properties return VideoTrackList niyati.

The VideoTrackList niyati represents the available video tracks of the video.

Each available video track is represented by a VideoTrack niyati.

example

get the number of available video tracks:

var x = document.getElementById("myVideo").videoTracks.length;

try it yourself

syntax

videoObject.videoTracks

return value

type description
VideoTrackList niyati

represents the available video tracks of the video.

VideoTrackList niyati:

  • videoTracks.length - get the number of available video tracks in the video
  • videoTracks.getTrackById(id] - get VideoTrack niyati by id
  • videoTracks[index] - get VideoTrack niyati by index
  • videoTracks.selectedIndex - get the index of the current VideoTrack niyati

Note:The first available VideoTrack niyati is at index 0.

VideoTrack niyati

represents the video track.

VideoTrack niyati属性:

  • id - ganin id
  • kind - ganin nuna
  • label - ganin girmek ucyor
  • language - Girmi yawan hanyar shirin
  • selected - Girmi ko sake girmi kada tsohuwar hanyar yana aiki (true|false)

Daukiyyar kind:

  • "alternative"
  • "captions"
  • "main"
  • "sign"
  • "subtitles"
  • "commentary"
  • "" (An empty string)

Tsarin Browser

Chrome Edge Firefox Safari Opera
Chrome Edge Firefox Safari Opera
Ba a suka amince da su Ba a suka amince da su Ba a suka amince da su Ba a suka amince da su Ba a suka amince da su