Open Bug 1438341 Opened 8 years ago Updated 1 year ago

getUserMedia uses different microphone from selected "Microphone to share"

Categories

(Core :: WebRTC: Audio/Video, defect, P3)

58 Branch
x86_64
Linux
defect

Tracking

()

People

(Reporter: karlt, Unassigned)

Details

Attachments

(1 file)

1. Connect USB mic to laptop 2. load https://mozilla.github.io/webrtc-landing/gum_test.html 3. Click "Audio". 4. Select USB "Microphone to share". 5. Click "Allow". 6. Tap USB Mic. Expect: tap sound. Actual: no tap sound. 7. Tap built-in mic on laptop. Expect: no sound. Actual: tap sound. 8. In system pulseaudio device settings, move channel to USB mic. 9. Repeat 6 and 7. Now have expected results. Same behavior in trunk and 58.0.1.
OS: Unspecified → Linux
Hardware: Unspecified → x86_64
Alex, can you repro on linux? Can we find a regression range?
Rank: 11
Flags: needinfo?(achronop)
Priority: -- → P2
Interaction with Pulse??
I cannot repro this one here. I am using USB mic from webcam c930. I select the USB mic on the gUM, which is not the default mic. The correct mic is connected. In sound settings I see that the built-in mic is selected which is correct (default device). I don't know why you are getting different results. Can you get logs (cubeb:4,MediaStreamGraph:4)?
Flags: needinfo?(achronop)
This reproduces back to at least Firefox 42, and so I suspect a change in the system rather than Firefox has triggered this, if it was working as expected before. The URL did not play sound on Firefox 40.0.3. With Firefox 42, it is initially the USB mic that is recording sound, but it changes to the built-in mic after a few seconds. I didn't observe this behavior with Nightly. If I change the "Default Audio Recording Device Preference" in the "Phonon Audio and Video" system settings module so that "Logitech H360 Headset Analog Mono" is preferred over "Built-in Audio Analog Stereo", then Firefox still defaults to "default: Built-in Audio Analog Stereo" but the headset mic is used regardless of what is selected. This may suggest that Phonon is applying its settings after Firefox.
Log of steps 1-9 and quit with "Built-in Audio Analog Stereo" restored to preferred.
Logs are pretty normal for that scenario. Have you managed to find anything wrong in pulse settings.
I wouldn't know what would make pulse settings "wrong". Thanks for looking at the logs. Bryce may have been experiencing something similar. I'm seeing this with Phonon, which is used for KDE. What was your environment, Bryce?
Flags: needinfo?(bvandyk)
I'm also under KDE. Indeed, it's only since starting to use Manjaro with KDE that I've encountered the issue. Previous VMs where I've run Ubuntu or Mint (neither with KDE) have been fine. I've been noticing while running our mochitests with the --use-test-media-devices flag, which should pickup a null output loopback. However, I instead get another input device (not at that computer at the moment, so not certain which one), but can switch the device used by Firefox in the pulse volume control to get the tests to behave as expected.
Flags: needinfo?(bvandyk)

This bug seems to have recently resurfaced on platforms other than Linux. Specifically, I see it on a Macbook pro running MacOS 10.14.5, and I have heard of reports of it on other systems.
To reproduce, go to the "WebRTC samples Select sources & outputs" page (https://webrtc.github.io/samples/src/content/devices/input-output/) on a machine with more than one microphone. One can select alternate microphones, and Mozilla will prompt to allow access, however the input source is never actually switched.
This page also displays another bug. The Audio output destination pull-down is never populated.
I am running Firefox version 67.0.4

I have a similar problem here with Firefox 74.0 (although it has been present in previous versions of Firefox as well) under Gentoo Linux. I am not using PulseAudio, but just ALSA directly. If I go to the WebRTC test site:

https://mozilla.github.io/webrtc-landing/gum_test.html

or use another medium like Google Video calling & try to use my USB webcam (Logitech HD Pro Webcam C920), I am able to select the video capture source as the webcam, but I only have the option of "default" for the microphone drop-down menu. That obviously won't work as the default microphone in ALSA is the onboard microphone input. In Chromium, I am able to select the appropriate microphone to use, so it seems like this is a problem within Firefox.

As this problem is not exactly the same as the one originally posted here, I can open a new bug if that is preferred. I commented here as I believe that the issues may be related to the same underlying problem.

Cheers,
Nathan Zachary

Severity: normal → S3
Priority: P2 → P3
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: