Bug 231422 - REGRESSION (iOS 15): Distorted audio output when AirPods are connected but not worn at the beginning of a WebRTC call
Summary: REGRESSION (iOS 15): Distorted audio output when AirPods are connected but no...
Status: NEW
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Safari 15
Hardware: iPhone / iPad Other
: P2 Major
Assignee: Nobody
Keywords: InRadar
Depends on:
Reported: 2021-10-08 04:37 PDT by Krieger
Modified: 2022-05-19 07:55 PDT (History)
9 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Krieger 2021-10-08 04:37:13 PDT
The audio output on iPhone is distorted, when AirPods is connected. This happens during webRTC video calls.

Tested on:
- https://appr.tc/
- https://janus.conf.meetecho.com/videocalltest.html

iPhone XS Max
Safari 15.1

steps to reproduce:
1. connect AirPods to the iPhone
2. have the AirPods on the desk during step 3.
3. build up a basic webRTC call with audio and video media from both peers
4. experience the audio on the iPhone is distorted, coming from the earpiece
5. wear the AirPods, and experience the same distorted sound coming from the AirPods now

steps to NOT reproduce:
1. connect AirPods to the iPhone
2. wear the AirPods during step 3.
3. build up a basic webRTC call with audio and video media from both peers
4. experience the audio is working fine, coming from the AirPods
5. put the AirPods on the desk
6. experience the audio is working fine, coming from the iPhone' earpiece

The issue came forth since the 15.0 release, and reproducible on 15.0.1 as well. The previous versions (14) did not have this issue.
Comment 1 Radar WebKit Bug Importer 2021-10-11 09:54:23 PDT
Comment 2 Smoley 2021-10-21 17:37:43 PDT
Thanks for filing, I've not been able to reproduce this on iOS 15.1 RC (19B74) or on TOT.
Comment 3 youenn fablet 2021-10-22 03:22:50 PDT
@Krieger, if you can reproduce on iOS 15.1 RC (19B74), can you reproduce the issue and send me a sysdiagnose, youenn@apple.com?

Also, do you know if this is specific to AirPods or is it reproducing with other BT headsets or BT speakers?
Comment 4 Krieger 2021-11-05 04:27:50 PDT
Thank you for checking this bug report. I just made a test with iOS 15.1 (19B74) and still can reproduce the issue.

What is a required step for the bug repro, is to do not have the AirPods in my ears when the webRTC call starts, only afterwards (otherwise, if they are in my while webRTC establishment, it works as expected).

I am using AirPods Pro (model number: A2084, version: 4A400). Currently I do not have other BT devices to test with.

@youenn I also sent you the sysdiagnose via email.
Comment 5 Yevhen Lv 2022-02-07 05:13:47 PST
May be it can help. My steps
- connect and use AirPods
- start video call with audio
- after success start put airpods into case
- get it back
- audio distorted
- after page reload all is good

If change airpods state when call is running audio will be distorted.
Comment 6 Mitch Talmadge 2022-02-10 14:33:34 PST
I am running into the same problem with Google Pixel Buds. Using https://janus.conf.meetecho.com/videocalltest.html:

1. Put in pixel buds on iPad.
2. Join a call.
3. Audio is distorted -- super slow and "monster-esque." Very low pitch. (Can others confirm that this is the same distortion they are getting?)
4. Take out pixel buds.
5. Audio remains distorted on the iPad itself.

If I join without pixel buds, it works fine. I can't always reproduce this but I've seen it happen on an iPhone with AirPods as well.
Comment 7 Mitch Talmadge 2022-02-10 15:50:30 PST
To add, my original test was on iOS 15.1 but I have just updated to 15.3 and still have this problem. Putting in the earbuds before starting the call almost always reproduces this problem.
Comment 8 Wolfe Lienhardt 2022-04-13 11:50:24 PDT
Some additional context for this and adding to @Mitch's issue.

The problem seems to only impact iOS/Mobile Safari and it's specifically when switching between the native audio device and external audio devices with a different sample rate.

Below is my experience interpretation of what is happening, albeit I have no idea if this is *actually* the underlying cause.

Bluetooth headsets (including airpods/pixel buds/whatever) generally run at 16khz  and the native device sample rate is generally at 44.1khz or 48khz.

In digging into this issue we've discovered it manifests in two ways depending on the order of operations, but both seem to be the same underlying cause. We've dubbed these 'chipmunk' and 'demon' mode depending on the way it manifests.

You can reproduce these on https://p2p.chat/ when it works -- the site itself is a bit finicky on safari.

to reproduce “demon”

1. get into a webrtc call without a bluetooth headset on
2. turn on the bluetooth headset mid call so that it pairs/directs audio to the device
3. refresh the browser

You should hear “demon voice” as the 48khz (native sample rate) audio is being interpreted at 16khz (headset sample rate) resulting in lost audio data and lower perceived pitch (I assume).

to reproduce “chipmunk”

1. get into a webrtc call with a bluetooth headset already on
2. turn the headset off mid call
3. refresh the device

You should hear “chipmunk voice” as the 16khz (headset sample rate) audio is being interpreted at 48khz (native sample rate) resulting in gaps in the sample buffer and a higher perceived pitch (again, I'm assuming).

The bigger problem is this is basically terminal. Once in the bad state, no amount of refreshing or re-negotiating the webrtc call will fix it. The only way I've found to fix it is to basically walk backwards through the steps that caused it, which isn't something I can expect users to do when part of those step involve turning on/off a headset.

The *good* news is in my testing after upgrading from 15.2 to 15.4.1 -- I can no longer reproduce this issue. I'd like some clarification from someone internal to let me know if this actually fixed however.
Comment 9 Mitch Talmadge 2022-04-13 19:37:20 PDT
I can reproduce Wolfe's comment on iOS 15.3 with 100% success every time, both 'demon' and 'chipmunk' variants. After updating to iOS 15.4 on my iPad, my wireless Pixel Buds do not play any sound at all during WebRTC calls. Other websites and apps work fine, like YouTube, but every WebRTC call I've tried has resulted in complete silence while using my bluetooth earbuds. The speakers work fine as soon as I turn off bluetooth.