mirror of
https://github.com/mollyim/webrtc.git
synced 2025-05-13 05:40:42 +01:00
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:
parent
c03827db1b
commit
3277fe1d75
1 changed files with 4 additions and 4 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue