[webkit-changes] [WebKit/WebKit] 1bf297: REGRESSION (iOS 17): mediaDevices.enumerateDevices...
youennf
noreply at github.com
Wed Oct 11 03:01:40 PDT 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 1bf29719b1040f73b6b1175cabb3e89534e4134a
https://github.com/WebKit/WebKit/commit/1bf29719b1040f73b6b1175cabb3e89534e4134a
Author: Youenn Fablet <youennf at gmail.com>
Date: 2023-10-11 (Wed, 11 Oct 2023)
Changed paths:
A LayoutTests/fast/mediastream/enumerateDevices-active-auxiliary-unit-expected.txt
A LayoutTests/fast/mediastream/enumerateDevices-active-auxiliary-unit.html
M LayoutTests/platform/glib/TestExpectations
M Source/WebCore/WebCore.xcodeproj/project.pbxproj
M Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h
M Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.h
M Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm
M Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h
M Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp
M Source/WebKit/UIProcess/API/C/WKUserMediaPermissionCheck.cpp
M Source/WebKit/UIProcess/API/C/WKUserMediaPermissionCheck.h
M Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp
M Tools/WebKitTestRunner/InjectedBundle/TestRunner.h
M Tools/WebKitTestRunner/TestController.cpp
M Tools/WebKitTestRunner/TestController.h
M Tools/WebKitTestRunner/TestInvocation.cpp
M Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm
Log Message:
-----------
REGRESSION (iOS 17): mediaDevices.enumerateDevices() breaks audio
https://bugs.webkit.org/show_bug.cgi?id=262569
rdar://116433066
Reviewed by Eric Carlson.
The auxiliary unit allows to enumerate all audio devices.
But, when enabled with PlayAndRecord, it might have an impact on rendered audio.
To prevent this effect, we are now limiting when this unit is made active.
In particular, when only camera capture happens, we are still exposing all capabilities
but we are limiting the unit to be active for a single run loop during which happens the microphone enumeration.
We add a WTR testRunner API to validate this is working as expected on iOS.
To make it work with mocks, we make MockAudioCaptureSourceFactory derive from CoreAudioCaptureSourceFactoryIOS on iOS.
* LayoutTests/fast/mediastream/enumerateDevices-active-auxiliary-unit-expected.txt: Added.
* LayoutTests/fast/mediastream/enumerateDevices-active-auxiliary-unit.html: Added.
* LayoutTests/platform/glib/TestExpectations:
* Source/WebCore/WebCore.xcodeproj/project.pbxproj:
* Source/WebCore/platform/mediastream/ios/AVAudioSessionCaptureDeviceManager.h:
* Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.h:
* Source/WebCore/platform/mediastream/ios/CoreAudioCaptureSourceIOS.mm:
(WebCore::CoreAudioCaptureSourceFactoryIOS::removeExtensiveObserver):
(WebCore::CoreAudioCaptureSourceFactoryIOS::createAudioCaptureSource):
* Source/WebCore/platform/mediastream/mac/CoreAudioCaptureSource.h:
* Source/WebCore/platform/mock/MockRealtimeMediaSourceCenter.cpp:
* Source/WebKit/UIProcess/API/C/WKUserMediaPermissionCheck.cpp:
(WKUserMediaIsEnumeratingAudioUnitActive):
* Source/WebKit/UIProcess/API/C/WKUserMediaPermissionCheck.h:
* Tools/WebKitTestRunner/InjectedBundle/Bindings/TestRunner.idl:
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.cpp:
(WTR::TestRunner::isEnumeratingAudioUnitActive const):
* Tools/WebKitTestRunner/InjectedBundle/TestRunner.h:
* Tools/WebKitTestRunner/TestController.cpp:
(WTR::TestController::isEnumeratingAudioUnitActive const):
* Tools/WebKitTestRunner/TestController.h:
* Tools/WebKitTestRunner/TestInvocation.cpp:
(WTR::TestInvocation::didReceiveSynchronousMessageFromInjectedBundle):
* Tools/WebKitTestRunner/cocoa/TestControllerCocoa.mm:
(WTR::TestController::isDoingMediaCapture const):
(WTR::TestController::isEnumeratingAudioUnitActive const):
Canonical link: https://commits.webkit.org/269196@main
More information about the webkit-changes
mailing list