MediaStreamTrack muted is always false even when microphone is muted on the system
Categories
(Core :: WebRTC: Audio/Video, defect)
Tracking
()
Webcompat Priority | P2 |
People
(Reporter: sam.gabriel, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/95.0.4638.54 Safari/537.36
Steps to reproduce:
When calling window.getUserMedia with {audio:true, video:false} the mediastream returned with a MediaStreamTrack has muted to false even when the system microphone is muted.
To mute the system microphone usually there is a hardware button but can be done with the following steps
On Windows 10 Open the Settings go to
Sound Settings:
Under Input Devices section click on Device Properties under the device name
Click on Additional Device Properties
This will open a dialog click on the Levels tab then click speaker icon to mute/unmute.
Actual results:
When calling window.getUserMedia with {audio:true, video:false} the mediastream returned with a MediaStreamTrack has muted to false even when the system microphone is muted.
navigator.mediaDevices.getUserMedia(constraints).then(function (stream)
{
var track = window.testTrack = stream.getTracks()[0];
log("Got track mutedState=", track.muted);
// track.muted is false here expected to be true
}).catch(function (err)
{
console.log(err);
});
Also changing the mute and unmute state of the system does not fire the mute and unmute state events
Expected results:
Expected that muted field is true and when changing the system mute state the mute and unmute events should fire.
This is how Chrome is behaving currently and provides developers with a way to warn users that their microphone is muted.
The specs also confirm that the useragent should set this value to the current os setting.
Comment 1•3 years ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::WebRTC: Audio/Video' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.
Comment 2•3 years ago
|
||
I can verify the unexpected behavior in 93 and 94, and in 96 after the webrtc.org update. I can also verify that it works properly in Edge.
Comment 3•1 year ago
|
||
This appears to be affecting Google Meet's UI, as reported on webcompat.com
Updated•1 year ago
|
Updated•1 year ago
|
This issue persists and affects Firefox specifically. I'm on a very different system than the original reporter, but I still experience the same bug.
On Arch Linux (kernel 6.6.6-zen1) with Firefox (120.0.1), adjusting the muted state of the system's default microphone (by toggling "mute" on the PulseAudio source) does not affect the result of mediaStream.getAudioTracks()[0].muted
, which is always false. In Chromium (120.0.6099.109) on the same system, the same muted
attribute changes according to the state of the microphone state.
I've made a small demo page at https://detect-mute.glitch.com.
Hi folks, this issue is still an issue on 121.0. Any status on this? Thanks!
Comment 6•5 months ago
|
||
If there was an update, it would be shared here in this very bug.
Comment 7•11 days ago
|
||
Still reproducible based on the webcompat report: https://github.com/webcompat/web-bugs/issues/119990
Environment:
Operating system: Windows 10
Browser tested: Firefox Nightly 128.0a1 (2024-05-29) / Firefox Release 126 / Chrome 125.0.6422.113
Note:
- Tested with microphone disabled in the Windows settings
- Not reproducible on Chrome
Description
•