fix: Fix outputOrientation Main Thread API checker (#1094)

This commit is contained in:
Marc Rousavy 2022-06-14 11:00:28 +02:00 committed by GitHub
parent 096b1cca4e
commit 04a8794246
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -44,6 +44,7 @@ extension CameraView {
self.videoPreviewLayer.connection?.setInterfaceOrientation(self.inputOrientation) self.videoPreviewLayer.connection?.setInterfaceOrientation(self.inputOrientation)
let connectionOrientation = self.outputOrientation
self.cameraQueue.async { self.cameraQueue.async {
// Run those updates on cameraQueue since they can be blocking. // Run those updates on cameraQueue since they can be blocking.
self.captureSession.outputs.forEach { output in self.captureSession.outputs.forEach { output in
@ -52,7 +53,7 @@ extension CameraView {
connection.automaticallyAdjustsVideoMirroring = false connection.automaticallyAdjustsVideoMirroring = false
connection.isVideoMirrored = isMirrored connection.isVideoMirrored = isMirrored
} }
connection.setInterfaceOrientation(self.outputOrientation) connection.setInterfaceOrientation(connectionOrientation)
} }
} }
} }