joeywatts / disable-autogain-control-extension

A chrome extension which disables the automatic microphone gain control in the MediaStream Web API.
MIT License
185 stars 19 forks source link

Expand support for more websites #5

Closed joeywatts closed 3 years ago

joeywatts commented 3 years ago

This commit adds support for more websites (such as MS Teams) by patching the deprecated "getUserMedia" function on the navigator object (and its vendor-prefixed equivalents). Additionally, it also now patches the MediaStreamTrack's applyConstraints function. The patched function now sets the autoGainControl property of the constraints to false, even if autoGainControl was not explicitly requested (set to true). This was also required to support Microsoft Teams (and I suspect several other sites), since it does not explicitly set the autoGainControl property on the audio constraints to true.

Fixes #4.