WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
212653
Web Audio AnalyserNode returning bad values for bluetooth headset input volume.
https://bugs.webkit.org/show_bug.cgi?id=212653
Summary
Web Audio AnalyserNode returning bad values for bluetooth headset input volume.
Jon Mudrick
Reported
2020-06-02 13:36:59 PDT
This issue affects iOS and macOS devices with a pre-attached set of bluetooth headphones being used as an input. First noticed with AirPods Pro and Airpods. If I try to create an analyser from a fresh AudioContext (using audioContext.createAnalyser() with an appropriate audio input source selected), created when a bluetooth device is connected to the device, any attempts to get volume data returns numbers near 0 instead of proper values. I'm using code similar to the example code found here:
https://developer.mozilla.org/en-US/docs/Web/API/AnalyserNode/getByteTimeDomainData
The above link has a demo page (
https://mdn.github.io/voice-change-o-matic/
) which exhibits the bad behavior. Some supporting details: All Data functions on the AnalyserNode return bad values (getFloatFrequencyData, getByteFrequencyData, getFloatTimeDomainData, getByteTimeDomainData) On iOS, where the only input device option from a call to enumerateDevices is just "iPhone Microphone": - If no bluetooth headset is connected when the analyser is created, and then a bluetooth headset is subsequently connected, correct data is reported by the AnalyserNode. - If a bluetooth headset is connected when the analyser is created, no correct data is reported by the AnalyserNode, even after the bluetooth headset is disconnected. On macOS: - Multiple audio inputs are available from enumerateDevices, as it can select from the built-in mic and the headset. - If an AnalyserNode is created from the bluetooth headset, it does not report correct data, but if an AnalyserNode is created from the built-in mic, it works correctly. I have witnessed similar behavior in chromium-based browsers on Windows, but only with AirPods, not with other types of bluetooth headphones I have handy.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2020-06-02 18:28:15 PDT
<
rdar://problem/63902783
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug