Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 49ad76ecb745e2f45446cd460699aa4af071a704
      
https://github.com/WebKit/WebKit/commit/49ad76ecb745e2f45446cd460699aa4af071a704
  Author: Youenn Fablet <[email protected]>
  Date:   2023-05-17 (Wed, 17 May 2023)

  Changed paths:
    M Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h
    M Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm

  Log Message:
  -----------
  [iOS] AVCatpureDeviceManager should set userPreferrerCamera
https://bugs.webkit.org/show_bug.cgi?id=256882
rdar://109220107

Reviewed by Eric Carlson.

Before https://bugs.webkit.org/show_bug.cgi?id=255451, we were forcing the 
default camera to be the front camera using media constraints.
This was blocking edfaulting to higher priority cameras, hence the fix.
The drawback is that we are now fully relying on systemPreferredCamera to 
select the default camera.
systemPreferredCamera might change depending on which camera was last used by 
the application.
We do not want that behavior, so we use userPreferredCamera to state that we 
are more interested in the front camera than in the back cameras.
Other camneras should still be higher priority if available.

Manually tested.

* Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.h:
* Source/WebCore/platform/mediastream/mac/AVCaptureDeviceManager.mm:
(WebCore::AVCaptureDeviceManager::computeCaptureDevices):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevicesInternal):
(WebCore::AVCaptureDeviceManager::setUserPreferredCamera):
(WebCore::AVCaptureDeviceManager::refreshCaptureDevices): Deleted.

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


_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to