Bug 241632 - REGRESSION (iOS 16 Beta): The sound doesn't go by default through connected Airpods
Summary: REGRESSION (iOS 16 Beta): The sound doesn't go by default through connected A...
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: Other
Hardware: iPhone / iPad Other
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2022-06-15 07:50 PDT by Madara Freimane
Modified: 2022-08-29 13:01 PDT (History)
3 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Madara Freimane 2022-06-15 07:50:26 PDT
Created attachment 460254 [details]
sysdiagnose_2022.06.13_10-56-50+0200_iPhone-OS_iPhone_20A5283p.tar.gz

SUMMARY:
The sound doesn't go by default through connected AirPods

Tested devices:
Bug is reproducible on:
- iPhone 13 | iOS 16 Beta

Bug is NOT reproducible on:
- iPhone 12 Pro Max | iOS 15.3
- iPhone XR | iOS 15.6

Scenario:
Precondition:
iOS User has AirPods connected
User has an active WebRTC call

Steps:
1. iOS User tries to communicate with other Users

Actual result:
The sound on iOS device doesn't go through the AirPods by default, iOS user have to select them in settings in order to be able to hear through them

Expected result:
When connected, the sound should go through the AirPods by default 

Reproducibility:
100%

Notes:
Bug is reproducible with following services using iOS 16 Beta:
- ACS sample
- web.skype.com
- Google Meets call for WEB
- https://webrtc.github.io/samples/src/content/devices/input-output/
Comment 1 Radar WebKit Bug Importer 2022-06-30 16:26:46 PDT
<rdar://problem/96253856>
Comment 2 Madara Freimane 2022-08-03 04:45:24 PDT
Additional information:

- the problem appears if AirPods already connected with device => User joins WebRTC call, audio still goes through device instead of AirPods, but if we connect device with AirPods while User is already in a call, no problem, the audio goes through the AirPods.

Reproduced the defect with:

- iPhone 11 Pro Max (iOS 16 Beta 4 (19G71))
Was not able reproduce the defect with:
- iPhone 11 (iOS 15.6 (20A5328h))

Let me know if there is a need to send additional sysdiagnose file.
Comment 3 youenn fablet 2022-08-26 01:08:05 PDT
I was not able to reproduce locally on a simple test page (https://webrtc.github.io/samples/src/content/peerconnection/pc1/).

I am wondering whether the website is asking to capture on the iPhone microphone, which will switch audio to iPhone instead of AirPods.

It might be worth checking whether the website is trying to select a particular microphone device (based on enumerateDevice) and see whether this goes against the current expected device.
Maybe enumerateDevices order is not always correct?
Comment 4 youenn fablet 2022-08-26 02:04:52 PDT
I tried using https://webrtc.github.io/samples/src/content/devices/input-output/ on my iPhone 16.

The following works:
1. I close Safari, use control center to change device to AirPods.
2. I open https://webrtc.github.io/samples/src/content/devices/input-output/
3. AirPods are selected for both input and output :)
The same happens if I redo these steps and change device to iPhone in control center.

Now the following happens.
1. I close Safari, use control center to change device to AirPods.
2. I open https://webrtc.github.io/samples/src/content/devices/input-output/
3. AirPods are selected :)
4. I change selection to iPhone Micro
5. Audio will flow on iPhone speaker
6. I close and reopen Safari, and reload the page.
7. iPhone Micro is selected.
At step 7, control center is still stating that AirPods are selected.

I am not able to reproduce on iPad with iOS 16.1 beta.
I am not sure whether this difference is iPad or iOS 16.1.
Comment 5 youenn fablet 2022-08-26 02:26:53 PDT
I was able to reproduce with iPad as well.

We select the current route input device as the default microphone.
But it does not always seem in sync with what Control Center says.
Maybe there is a better way to detect what the default microphone should be.
Comment 6 youenn fablet 2022-08-26 05:06:41 PDT
Pull request: https://github.com/WebKit/WebKit/pull/3703
Comment 7 EWS 2022-08-29 13:01:31 PDT
Committed 253921@main (3f849c5584fc): <https://commits.webkit.org/253921@main>

Reviewed commits have been landed. Closing PR #3703 and removing active labels.