-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implementers must not refuse to open sources set as default at the machine: "DOMException: Could not start audio source" is not in the specification #708
Comments
If a user runs this line
at a shell, then the expected behaviour is for the source set to be captured at |
This bug leads back to the sequence of events described at #703 (comment), specifically, the order should be
where even then the same code cannot be run at both Chromium and Nighly 80 because Nighly lists Preferably the devices should be able to be selected before capture of the device is started. There should be consistency here. |
According to PulseAudio/Examples monitor device is an input source
For disambiguation in this specification are monitor devices audio input |
Unfortunately, I don't think specs have a lot of sway convincing vendors what to implement, only how to implement it. While "User Agents are encouraged to default to using the user's primary or system default device", there is no requirement. Which devices to expose is entirely up to the user agent. If a browser exposes a non-functioning device in |
Just for reference, the exposed monitor devices are 100% functional. These devices function exactly as intended and have practical application for music visualization and other exotic audio configurations. While I agree specs are unlikely to force a vendor's hand, I want to acknowledge there are use-cases where these devices are the one's a user/developer intended to use. The mistake that a virtual device is "non-functioning" seems earnest and with good intention. That said it is quite frustrating to learn the input device you configured is arbitrarily blacklisted by a vendor despite it's availability. A user could disable monitor devices if they wanted on the system level. I'd imagine if we wanted to disable monitor devices by default it'd be better to take that upstream to the audio-libraries as opposed to have vendors go against spec b/c they do not commonly use the feature. |
Just FYI, the reason Chrome doesn't expose monitor devices is not that they are virtual or non-functioning. In fact, Chrome exposes some virtual devices, like the "Communications" device on Windows, and "Default" devices on all platforms, which map to real microphones. The reason Chrome doesn't expose monitor devices is that in our past experience they create a lot of confusion among users because they are not microphones. gUM in Chromium is designed (UI, audio processing, etc.) to support microphones. So, this is not a bug in the spec. It would be a feature request for Chromium, which Chromium has no interest to implement at the moment. |
Chromium deliberately refuses to open a source which are monitor inputs at Linux per https://chromium.googlesource.com/chromium/src/+/4519c32f528e079f25cb2afc594ecf625f943782, see https://bugs.chromium.org/p/chromium/issues/detail?id=931749.
which results in this code
throwing this exception
DOMException: Could not start audio source
No such error is thrown at Nightly 80 and the device set as default, listed first in the UI when the same code is run.
The problem is such a
DOMException
is not described in the specification. Nor is restricting monitor sources set as default by the user intentionally at their machine.The specification should not care which sources the user sets at OS level. If the user sets a default source for microphone at the OS then
getUserMedia({audio: true})
should capture that source, not throw aDOMException
with attached message claim "Could not start source", which is simply not true, as it is possible to dynamically set the source to a monitor aftergetUserMedia({audio: true})
is called usingpavucontrol
orpavucontrol-qt
- which will result in the device that was claimed could not start being captured.The solution is to state clearly that Implementers must not refuse to open sources set as default at OS. It is the users' prerogative which device they set as default source, not implementers, language such as
should suffice, for the ability cite the controlling specification at the above-listed bug report, indicating that behaviour is non-conformant with the specification, and must be modified to not restrict capture of the default source set by the user at their own machine.
The text was updated successfully, but these errors were encountered: