Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Cherry-pick 49ad76e. rdar://problem/109220107
[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 Identifier: 263769.41@safari-7616.1.14.10-branch
- Loading branch information