Languages

Menu
Sites
Language
Video tag not work audioTracks

Hello everyone, I created a web application with a video player.

But switching audio tracks doesn't work. I am using this specification:

https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/audioTracks

What is the problem, the choice of tracks shows, but when I switch the sound remains the same.

How do I switch tracks.

 

for (var i = 0; i < _video.audioTracks.length; i++) {

_video.audioTracks[i].enabled = false;

}

_video.audioTracks[1].enabled = true;

 

It works on new TVs in 2020, it does not work on later ones 2017-2019.

What could be the problem? In the ATV player itself, the switch works.