From 3277fe1d75d6ce455b81fa7426aa494783a05ab6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1ri=20Tristan=20Helgason?= Date: Thu, 21 Mar 2024 11:16:05 +0100 Subject: [PATCH] Fix UIDeviceOrientation enums. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Bug: b/328490295 Change-Id: Ieaeaddbc94528fba32c793986d20d54683a1d7a9 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/343782 Auto-Submit: Kári Helgason Reviewed-by: Mirko Bonadei Commit-Queue: Mirko Bonadei Cr-Commit-Position: refs/heads/main@{#41938} --- sdk/objc/helpers/RTCCameraPreviewView.m | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/objc/helpers/RTCCameraPreviewView.m b/sdk/objc/helpers/RTCCameraPreviewView.m index 12e87d8d64..7fb1831ed0 100644 --- a/sdk/objc/helpers/RTCCameraPreviewView.m +++ b/sdk/objc/helpers/RTCCameraPreviewView.m @@ -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; }