Fix UIDeviceOrientation enums.

Bug: b/328490295
Change-Id: Ieaeaddbc94528fba32c793986d20d54683a1d7a9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343782
Auto-Submit: Kári Helgason <kthelgason@webrtc.org>
Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org>
Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#41938}
This commit is contained in:
Kári Tristan Helgason 2024-03-21 11:16:05 +01:00 committed by WebRTC LUCI CQ
parent c03827db1b
commit 3277fe1d75

View file

@ -84,16 +84,16 @@
// First check if we are allowed to set the video orientation.
if (previewLayer.connection.isVideoOrientationSupported) {
// Set the video orientation based on device orientation.
if (deviceOrientation == UIInterfaceOrientationPortraitUpsideDown) {
if (deviceOrientation == UIDeviceOrientationPortraitUpsideDown) {
previewLayer.connection.videoOrientation =
AVCaptureVideoOrientationPortraitUpsideDown;
} else if (deviceOrientation == UIInterfaceOrientationLandscapeRight) {
} else if (deviceOrientation == UIDeviceOrientationLandscapeRight) {
previewLayer.connection.videoOrientation =
AVCaptureVideoOrientationLandscapeRight;
} else if (deviceOrientation == UIInterfaceOrientationLandscapeLeft) {
} else if (deviceOrientation == UIDeviceOrientationLandscapeLeft) {
previewLayer.connection.videoOrientation =
AVCaptureVideoOrientationLandscapeLeft;
} else if (deviceOrientation == UIInterfaceOrientationPortrait) {
} else if (deviceOrientation == UIDeviceOrientationPortrait) {
previewLayer.connection.videoOrientation =
AVCaptureVideoOrientationPortrait;
}