Closed Bug 1922313 Opened 1 year ago Closed 1 year ago

getUserMedia() drastically lowers MacOS system microphone volume

Categories

(Core :: Audio/Video: Playback, defect)

Firefox 131
defect

Tracking

()

RESOLVED DUPLICATE of bug 1896938

People

(Reporter: vee.sereda, Unassigned)

Details

Steps to reproduce:

It seems that on Macbook M3, requesting a microphone input device in Firefox using getUserMedia() results in the system's microphone volume becoming very quiet. This means that Firefox is affecting the input volume in other applications, and that opening a website in Firefox could potentially break microphone volume in a Chrome video meeting.

Tested on: Macbook Pro M3 Max, MacOS 14.4.1. Using built-in microphone, built-in speakers, audio routing using BlackHole. No external devices connected.

Here is a screen recording illustrating the problem, using a sine tone to measure the system microphone volume: https://youtu.be/pCmVL_C2ipQ
From the recording, you can see that after user media is requested in Firefox, monitoring volume in Chrome drops from -18db -> -60db, and the System Settings "Input Level" drops.

Steps:

  1. Create a baseline measurement to be able to measure the impact of Firefox on system's microphone volume:
    Method (a): Fully close Firefox. Open System Settings -> Sound, and check the "Input Level" monitor. It should be responsive to reasonably loud sounds.
    Method (b): Fully close Firefox. Play a sound into the microphone with a constant volume (e.g. sine wave). Open Chrome, and use a tool to measure microphone volume, e.g. https://codepen.io/VeeSereda/pen/LYwGXeR
  2. Open Firefox. In Firefox, request user media (audio), granting microphone permissions. e.g. using https://codepen.io/VeeSereda/pen/dyxGaoa
  3. Observe a system-wide microphone input volume drop (more info below).

What did NOT help in resolving this issue:
* setting media.getusermedia.microphone.prefer_voice_stream_with_processing.enabled to false
* setting media.getusermedia.channels to 1
* setting media.getusermedia.audio.max_channels to 1
* setting media.getusermedia.audio.processing.agc.enabled to false
* setting media.getusermedia.audio.processing.agc2.forced to false
* setting media.getusermedia.audio.processing.aec.enabled to false
* setting media.getusermedia.audio.processing.platform.enabled to false

Actual results:

  • Microphone volume in Firefox is much quieter than microphone volume in Chrome (-18db in Chrome, -60db in Firefox), using https://codepen.io/VeeSereda/pen/LYwGXeR to measure.
  • In System Settings -> Sound, The "Input Level" meter is now much less responsive, indicating that Firefox has changed the system's microphone gain.
  • In Chrome, when monitoring input volume using https://codepen.io/VeeSereda/pen/LYwGXeR , the input volume drops considerably.

Expected results:

  • Microphone volume in Firefox should be comparable to microphone volume in Chrome when using the same setup.
  • In System Settings -> Sound, The "Input Level" should remain responsive as before, indicating that system microphone gain has not changed.
  • Microphone volume in other applications (e.g. Chrome) should not have changed.

The Bugbug bot thinks this bug should belong to the 'Core::Audio/Video: Playback' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.

Component: Untriaged → Audio/Video: Playback
Product: Firefox → Core
No longer blocks: webrtc-triage
Status: UNCONFIRMED → RESOLVED
Closed: 1 year ago
Duplicate of bug: 1896938
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.