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

Issue 617221 link

Starred by 3 users

Issue metadata

Status: WontFix
Owner:
Closed: Jul 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

WebRTC control audio playback on android mobile device - chrome broswer

Reported by sasi.var...@talismantelecom.com, Jun 3 2016

Issue description

Chrome Version       : 50.0.2661.89
OS version  : Android 5.2 
Audio issue
HTML5

What steps will reproduce the problem?
(1) Set up a peer-peer WebRTC call between Mobile chrome and a desktop chrome
(2) Once the call connects. Audio output will come in Earpiece and External speakers
(3) Open the debug console of Mobile chrome in Desktop via USB debugging and check audio tag available functions to set audio playback devices.

What is the expected result?
Should show audio element should show setSinkId and be able to set Earpiece as playback device

What is the actual result?
No option to control audio playback device on Mobile chrome.


Any additional information (anything else which may help us debug the
issue)?
It happens in All the android devices that i tested with. Mine is Samsung S4

Additional info:
Android Chrome V(50.0.2661.89) has webRTC support. So i'm trying to set up Webrtc call between Mobile chrome browser and Desktop. All works good. But on Android mobile (Samsung S4, all event few more brands). audio output is coming on both Ear piece and External speaker. I could not control the output audio to playback only on Ear piece. Like normal mobile calls. <audio> tag has ability to set playback device id by using this HTMLMediaElement.setSinkId(sinkId).then(function() { ... }) but in mobile chrome its not enabled. If it try to get all media devices. it gives only 1 kind audio output as default. I know this possible in native android app

 
IFcaD.png
143 KB View Download
Components: -Internals>Media Blink>WebRTC>Audio
Cc: tommi@chromium.org olka@chromium.org
Tommi, please help with an owner.
Team, Please suggest if there is a work around.

Comment 4 by olka@chromium.org, Jul 12 2016

Owner: guidou@chromium.org

Comment 5 by guidou@chromium.org, Jul 12 2016

Cc: henrika@chromium.org
Chromium does not support setSinkId() on Android because Android's Audio API does not have a concept of separate audio devices that can be switched like other Chromium platforms do.
That said, playing audio from a WebRTC call on both an external speaker and the earpiece does sound like a bug.

+henrika@ Do you have any thoughts regarding this matter?
My only input is that it should not be possible to play out in both these audio devices at the same time. There are simply no APIs available to do so and if it happens it sounds like a device specific issue.

Can it be reproduced with a more recent device running a later Android version?
If setSinkId() is not exposed in Android's Audio API. Then its not a bug. Its a feature that's not implemented. Will this be taken as a feature request to implement in Android's Audio API? Please give some suggestions.
I've tested this with Multiple brands like Samsung S4 (Android 5.0.1), HTC m8, Asus zenfone 2. Output audio is coming on both.
Easy way to reproduce is try apprtc.appspot.com in Android Chrome browser and share the same like to desktop chrome.
Its the audio tag in HTML5 that exposes setSinkId() in general.
Might sound like an odd question but how can you tell that the audio comes from both?
Hi, In my recent test, Only my Samsung s4 got affected. But in other devices output comes on External speaker only.
However, here in https://developer.mozilla.org/en-US/docs/Web/API/HTMLMediaElement/sinkId on Mobile compatibility it show setSinkId is supported in Chrome for Android > 49.0

 
It is still not clear to me how you can tell that you have audio in both the earpiece and the speaker phone on the S4. How exactly do you verify that?

On S4, if you plug in a headset, is audio routed to it then?
If i plugin earphone/headset then output audio comes only on earphone/headset.
Could you please answer all the questions in #11. We will not be able to help you otherwise. "How you can tell that you have audio in both the earpiece and the speaker phone on the S4?"
I tried closing the backside speaker with finger completely on S4 then i could hear the audio still on earpiece. And some times it comes only on earpiece. Its too odd with S4. So its specific to this device.

Will there be setSinkId() available for Android chrome in future? Since i could see 3 audio output available for a mobile device. earpiece, Backside speaker, Earphone/Headset.

Thanks for your time. Now its clear to me that HTML5 audio playback happens only on external speaker.


sasi.varuan@: It's still not clear to us what your request is. Are you seeing a bug on your devices and believe that having setSinkId would help you work around those, or are you simply requesting setSinkId on Android?

Whatever the case, setSinkId is not on Android because Android does not does not currently have a mechanism that would allow us to associate different audio output devices to different HTML audio/video elements. Once such a mechanism is in place we will be able to provide setSinkId on Android.

Status: WontFix (was: Unconfirmed)
sasi.varunan@: I didn't read your comment #14 before my reply.
Based on that comment, I see that your issue is device specific and not a general bug.

With regards to setSinkId(), we will have it available on Android once the Android platform provides the mechanisms necessary to implement it on Chromium. There is no ETA for that.

Closing this bug. Please reopen if you believe there is anything actionable that we have not yet covered.

Sign in to add a comment