From 00718ea0ee2e38ca15d9181dc83af10924c52aa7 Mon Sep 17 00:00:00 2001 From: Marc Rousavy Date: Thu, 19 Oct 2023 17:02:07 +0200 Subject: [PATCH] fix: Set `sensorOrientation` to `landscapeRight` --- package/ios/Extensions/AVCaptureDevice+toDictionary.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/package/ios/Extensions/AVCaptureDevice+toDictionary.swift b/package/ios/Extensions/AVCaptureDevice+toDictionary.swift index 69e0a59..6ad1ed0 100644 --- a/package/ios/Extensions/AVCaptureDevice+toDictionary.swift +++ b/package/ios/Extensions/AVCaptureDevice+toDictionary.swift @@ -27,7 +27,9 @@ extension AVCaptureDevice { "supportsLowLightBoost": isLowLightBoostSupported, "supportsFocus": isFocusPointOfInterestSupported, "hardwareLevel": "full", - "sensorOrientation": Orientation.landscapeLeft.jsValue, + // TODO: Get orientation from `AVCaptureDevice.RotationCoordinator`, then just transform `AVAssetWriter` + // See https://github.com/mrousavy/react-native-vision-camera/issues/2046 + "sensorOrientation": Orientation.landscapeRight.jsValue, "formats": formats.map { $0.toJSValue() }, ] }