Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

REGRESSION (iOS 16 Beta): The sound doesn't go by default through connected Airpods #3703

Conversation

youennf
Copy link
Contributor

@youennf youennf commented Aug 26, 2022

3f849c5

REGRESSION (iOS 16 Beta): The sound doesn't go by default through connected Airpods
https://bugs.webkit.org/show_bug.cgi?id=241632
rdar://problem/96253856

Reviewed by Eric Carlson.

We were previously computing the default microphone based on the current route.
This is not always correlated with control center.
Instead, we can rely on MediaExperience AVSystemController pickableRoutesForCategory to identify which route to select as a default.
This ensures better synchronizatio with control center and does not change based on whether starting to capture on a non default audio route.
For instance, on iPad, if the default pickable route is AirPods, but the web page decides to select the built in microphone, we will no longer
consider the built in microphone as the default microphone. This will reduce the number of devicechange events as well.

Manually tested.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/spi/ios/MediaExperienceAVSystemControllerSPI.h:
* Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
(WebCore::computeDefaultMicrophoneInformation):
(WebCore::AVAudioSessionCaptureDeviceManager::retrieveAudioSessionCaptureDevices const):

Canonical link: https://commits.webkit.org/253921@main

c0b2067

Misc iOS, tvOS & watchOS macOS Linux Windows
❌ πŸ§ͺ style βœ… πŸ›  ios βœ… πŸ›  mac βœ… πŸ›  wpe βœ… πŸ›  πŸ§ͺ win
βœ… πŸ§ͺ bindings βœ… πŸ›  ios-sim βœ… πŸ›  mac-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl βœ… πŸ§ͺ ios-wk2 βœ… πŸ›  mac-AS-debug βœ… πŸ§ͺ gtk-wk2
βœ… πŸ§ͺ api-ios βœ… πŸ§ͺ api-mac βœ… πŸ§ͺ api-gtk
βœ… πŸ›  πŸ§ͺ jsc βœ… πŸ›  tv βœ… πŸ§ͺ mac-wk1 βœ… πŸ›  jsc-armv7
βœ… πŸ›  tv-sim βœ… πŸ§ͺ mac-wk2 βœ… πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  πŸ§ͺ merge βœ… πŸ›  watch βœ… πŸ§ͺ mac-AS-debug-wk2 βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim βœ… πŸ§ͺ mac-wk2-stress βœ… πŸ§ͺ jsc-mips-tests

@youennf youennf self-assigned this Aug 26, 2022
@youennf youennf added Other WebRTC For bugs in WebRTC labels Aug 26, 2022
@youennf youennf requested review from jernoble, eric-carlson and jyavenard and removed request for jernoble August 26, 2022 12:21
@youennf youennf force-pushed the eng/REGRESSION-iOS-16-Beta-The-sound-doesnt-go-by-default-through-connected-Airpods branch from 719af25 to a36caae Compare August 26, 2022 12:31
@youennf youennf force-pushed the eng/REGRESSION-iOS-16-Beta-The-sound-doesnt-go-by-default-through-connected-Airpods branch from a36caae to bd22903 Compare August 26, 2022 12:39
@youennf youennf force-pushed the eng/REGRESSION-iOS-16-Beta-The-sound-doesnt-go-by-default-through-connected-Airpods branch from bd22903 to c0bf9d6 Compare August 28, 2022 08:04
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Aug 28, 2022
@youennf youennf force-pushed the eng/REGRESSION-iOS-16-Beta-The-sound-doesnt-go-by-default-through-connected-Airpods branch from c0bf9d6 to c0b2067 Compare August 28, 2022 09:01
Copy link
Contributor

@eric-carlson eric-carlson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

@youennf youennf added merge-queue Applied to send a pull request to merge-queue and removed merging-blocked Applied to prevent a change from being merged labels Aug 29, 2022
…nected Airpods

https://bugs.webkit.org/show_bug.cgi?id=241632
rdar://problem/96253856

Reviewed by Eric Carlson.

We were previously computing the default microphone based on the current route.
This is not always correlated with control center.
Instead, we can rely on MediaExperience AVSystemController pickableRoutesForCategory to identify which route to select as a default.
This ensures better synchronizatio with control center and does not change based on whether starting to capture on a non default audio route.
For instance, on iPad, if the default pickable route is AirPods, but the web page decides to select the built in microphone, we will no longer
consider the built in microphone as the default microphone. This will reduce the number of devicechange events as well.

Manually tested.

* Source/WTF/wtf/PlatformHave.h:
* Source/WebCore/PAL/PAL.xcodeproj/project.pbxproj:
* Source/WebCore/PAL/pal/spi/ios/MediaExperienceAVSystemControllerSPI.h:
* Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.mm:
(WebCore::computeDefaultMicrophoneInformation):
(WebCore::AVAudioSessionCaptureDeviceManager::retrieveAudioSessionCaptureDevices const):

Canonical link: https://commits.webkit.org/253921@main
@webkit-early-warning-system webkit-early-warning-system force-pushed the eng/REGRESSION-iOS-16-Beta-The-sound-doesnt-go-by-default-through-connected-Airpods branch from c0b2067 to 3f849c5 Compare August 29, 2022 20:01
@webkit-commit-queue
Copy link
Collaborator

Committed 253921@main (3f849c5): https://commits.webkit.org/253921@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 3f849c5 into WebKit:main Aug 29, 2022
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Aug 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
WebRTC For bugs in WebRTC
Projects
None yet
5 participants