Output devices are not switched correctly when an audio element (which is also a source to an audioContext) is being played
Reported by
utsav.sb...@gmail.com,
Dec 22 2016
|
||||||
Issue descriptionUserAgent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_12_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/55.0.2883.95 Safari/537.36 Steps to reproduce the problem: 1. Add as audio element with some sound source 2. Create mediaElementSource from audio element and connect to an analyzer node 3. play the sound through any device, and change the devices (setSinkId) Here is a jsfiddle https://jsfiddle.net/w3rxskok/34/ What is the expected behavior? It should correctly switch the output devices while being played. What went wrong? It throws "DOMException: The operation could not be performed and was aborted". If we do not set the same element as a source in audioContext than it works fine. Did this work before? N/A Does this work in other browsers? N/A Chrome version: 55.0.2883.95 Channel: stable OS Version: OS X 10.12.1 Flash Version: Shockwave Flash 24.0 r0
,
Dec 22 2016
I'm unable to reproduce. The devices listed are default, jack, and null. Selecting either default or jack while playing does not produce an error message. Chrome 56.0.2924.28 (beta) on Linux. Chrome 55.0.2883.87, however, has this problem. I can't even switch to the null output device. Please try this with Chrome 56 (beta). In any case, WebAudio doesn't do routing of audio; it's handled by chrome's media stack (somewhere).
,
Dec 22 2016
Hello, thank you for a quick response. Unfortunately I do not have linux system right now, but I can confirm the issue with Windows and Mac : Stable, Beta and Canary, they have the issue reproducible. (stable 55.0.2883.95 (64-bit), beta 56.0.2924.28 (64-bit), canary 57.0.2959.0 (64-bit)). I hope you did not forget to uncomment the function call while checking in beta. Here is the jsfiddle with correctly uncommented function call. https://jsfiddle.net/w3rxskok/35 (let me know if I need to file the bug somewhere else. Thank You).
,
Dec 22 2016
Hmm. I thought I had uncommented out the line, but using the latest fiddle, I cannot select an output device. While other devices are shown, I can only output to Default. WebAudio doesn't do any kind of routing, so perhaps Chrome won't allow switching devices if webaudio is running.
,
Jan 5 2017
Seems to be a rash of these. I think there's been a recent regression.
,
Jan 10 2017
We are failing in SwitchOutputDevice because |client_| is not null. https://cs.chromium.org/chromium/src/media/blink/webaudiosourceprovider_impl.cc?sq=package:chromium&dr&rcl=1484036522&l=271
,
Jan 10 2017
,
Jan 10 2017
When the media element is routed to an audio context, output is controlled by the audio context and not by the settings of the media element. Audio contexts do not support switching the output device and that is the reason setSinkId fails in this case, so this is working as intended. Alternatively, we could also switch the internal audio sink for the media element, but that should not switch the actual output device because audio rendering is controlled by the context and not the element. However, doing this would be even more confusing than failing. If Web Audio gains the ability to switch the output device, perhaps we could forward the setSinkId request to the context, but that is currently not available and it is not clear that it will ever become available. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by utsav.sb...@gmail.com
, Dec 22 2016