iOS: Don’t change video rotation in FaceUp or FaceDown.

Previously, if using the device in landscape and then tilting the phone
into FaceUp orientation, the video rotation would reset to portrait.

Bug: webrtc:8492
Change-Id: I3e11e3adecabf99249ba3a8d5532291580a93f2e
Reviewed-on: https://webrtc-review.googlesource.com/24021
Reviewed-by: Kári Helgason <kthelgason@webrtc.org>
Commit-Queue: Kári Helgason <kthelgason@webrtc.org>
Cr-Commit-Position: refs/heads/master@{#20792}
diff --git a/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m b/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
index 2b31e10..492c210 100644
--- a/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
+++ b/sdk/objc/Framework/Classes/UI/RTCCameraPreviewView.m
@@ -90,10 +90,11 @@
     } else if (deviceOrientation == UIInterfaceOrientationLandscapeLeft) {
       previewLayer.connection.videoOrientation =
           AVCaptureVideoOrientationLandscapeLeft;
-    } else {
+    } else if (deviceOrientation == UIInterfaceOrientationPortrait) {
       previewLayer.connection.videoOrientation =
           AVCaptureVideoOrientationPortrait;
     }
+    // If device orientation switches to FaceUp or FaceDown, don't change video orientation.
   }
 }