New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 851160 link

Starred by 8 users

Issue metadata

Status: Assigned
Owner:
Last visit > 30 days ago
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux , Android , Windows , Chrome , Mac
Pri: 2
Type: Feature



Sign in to add a comment

Enable <video>'s HTMLMediaElement.audioTracks (AudioTrackList / AudioTrack) by default

Reported by olson....@gmail.com, Jun 8 2018

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36

Steps to reproduce the problem:
1. Create a <video> element.
2. Get a JavaScript reference to that element.
3. Try to access `videoElement.audioTracks`.

What is the expected behavior?
The property should be there and function per the HTML5 standard: https://www.w3.org/TR/html50/embedded-content-0.html#dom-media-audiotracks

Browser support is fairly. IE10, IE11, Edge 12-18, Safari 6.1-12 all support it. Firefox has had behind a feature flag since v33 (October 2014); I'm not sure why they still have it behind a flag because it seems to work. https://caniuse.com/#feat=audiotracks

What went wrong?
The property isn't there.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: 67.0.3396.62  Channel: n/a
OS Version: 10.0
Flash Version:
 
Cc: acolwell@chromium.org
Components: Blink>Media>Video
Labels: -Type-Bug OS-Android OS-Chrome OS-Linux OS-Mac Type-Feature
Owner: servolk@chromium.org
Status: Untriaged (was: Unconfirmed)
Summary: Enable <video>'s HTMLMediaElement.audioTracks (AudioTrackList / AudioTrack) by default (was: Support <video>'s HTMLMediaElement.audioTracks (AudioTrackList / AudioTrack))
The code is there, it more or less work (barring certain limitations like no simultaneously-enabled tracks), but you have to enable a command line flag for it to work. Turning this issue into an "enable it by default" feature request.

@servolk - is this planned to be enabled by default soon?

Comment 2 by olson....@gmail.com, Jun 11 2018

@phistuck - thanks for the response. What is the command line flag? I'm not seeing anything in chrome://flags; I take it it's strictly command line?

Should I be concerned @servolk and @acolwell have last visited this site 96 days ago and 456 days ago respectfully?
#2 - the "Experimental Web Platform features" flag should enable, I believe.
If not, I can try and dig up the flag of this specific feature.

I would not be worried about that. They are probably using their @google.com account to log into this issue tracker instead (and @chromium.org usually forwards e-mails to their @google.com e-mail).

Comment 4 by olson....@gmail.com, Jun 11 2018

@phistuck - Yep, that flag worked as expected.

So, yes, I concur: please turn this issue into an "enable it by default" feature request. :-)

Cc: mlamouri@chromium.org
This is something my team has in its radar. We would like to allow this in the context of a larger project. FWIW, there was an attempt to enable this API by default in the past but it did face some push back because of compatibility issues. We would need to solve these issues before attempting to enable the API by default. It's not as simple as toggling a flag :)

Comment 6 by phistuck@gmail.com, Jun 12 2018

#5 - I did not mean to imply it is simple. :)

Can you block this issue on the compatibility issues, or are they unreported?
Can you expand a bit on those issues?

Thank you!
I looked at this a while ago and investigated. I think the issue were reported during the Intent to Ship that was probably 2+ years ago.

Comment 8 by phistuck@gmail.com, Jun 12 2018

The thread -
https://groups.google.com/a/chromium.org/d/msg/blink-dev/Yk8u329AmIs/iQ5zzjvsAAAJ

Looks like Rick requested some sort of interoperability status and that was the end of the thread...
I am also interested in Chrome (desktop) support for selecting one of multiple  audio tracks in mp4 video files that typically contain multiple stereo aac streams in different languages. 

I am aware that enabling the "Experimental Web Platform features" appears to enable support for the HTML 5 video.audioTracks property and I can then enable any of the other tracks (only one at a time but that would be sufficient for now). 

However, the experimental flag may not be acceptable to end users.

Is there any other way to control which audio track Chrome will decode? 
Is there any other way to override or configure the audio demux programmatically from within the web page?

Is there anything in the mp4 audio metadata that would influence which audio track Chrome will play by default? 
e.g. I tried changing which audio stream is "default" using the ffmpeg stream disposition option but this did not appear to have any effect in Chrome.

Thanks!

 



 
Status: Assigned (was: Untriaged)
This bug has an owner, thus, it's been triaged. Changing status to "assigned".
From MDN, they said Firefox after 33 should support it, by enabling a flag like Chrome, but actually doesn't work based on my test.

The funny thing is, MDN only shows Firefox support this feature, but actually Edge and Safari support this feature very well, without any flag settings.

So please, if it works, make it default. I'm working on an Electron app which means I can only use chromium.

  
ok, I know why it's not enabled by default, it's unstable. 
I have an mp4 file which has two audio tracks. My code looks like this:
`
  <script>
    var track = 0;
    function changeTrack() {
      var video = document.getElementById("video");
      track = 1 - track;
      video.audioTracks[0].enabled = (track === 0);
      video.audioTracks[1].enabled = (track === 1);
    }
  </script>
`

It works well on Safari and Edge, but it crashes on chrome. If it didn't crash, then the video paused, but the audio was playing.




Your function throws an exception on Chrome because only a single track of each type (audio, video) is supported at the moment (and even that is behind a flag).
So video.audioTracks[1] returns undefined and undefined.enabled throws an exception.

I cannot comment on the stability of the implementation (I do not know the code), but I believe stability is not the issue, but the lack of support for multiple tracks is.
Thanks @phistuck, that make sense. Actually it’s same as Firefox, Only support one track makes this feature totally useless.


Sign in to add a comment