mrousavy / react-native-vision-camera

📸 A powerful, high-performance React Native Camera library.
https://react-native-vision-camera.com
MIT License
7.35k stars 1.07k forks source link

🐛 [IOS] On iPhone 8 the camera screen is displayed horizontally on release mode but work perfectly on debug mode #3092

Closed medkhalifa-91 closed 2 months ago

medkhalifa-91 commented 2 months ago

What's happening?

When opening the camera using an IPhone 8 the camera is reverted and has a wrong 90 rotation.

I reproduce this issue only on release mode.

https://github.com/user-attachments/assets/0a52b311-ccea-4295-8c2f-0930284d6111

Reproduceable Code

<RNVCamera
          ref={ref}
          audio={hasMicrophonePermission}
          device={device}
          format={format}
          fps={fps}
          isActive
          lowLightBoost={device.supportsLowLightBoost}
          onInitialized={onInitialized}
          photo={state?.mode === CameraState.PHOTO}
          style={styles.camera}
          testID={'camera'}
          video={state?.mode === CameraState.VIDEO}
          videoHdr={false}
          zoom={zoom}
        />

Relevant log output

LOG Issue reproduced on release mode only and not on debug mode
LOG  Issue reproduced on release mode only and not on debug mode
LOG  Issue reproduced on release mode only and not on debug mode
LOG  Issue reproduced on release mode only and not on debug mode
LOG  Issue reproduced on release mode only and not on debug mode

Camera Device

{
  "position": "back",
  "hardwareLevel": "full",
  "supportsLowLightBoost": false,
  "maxExposure": 8,
  "neutralZoom": 1,
  "supportsFocus": true,
  "supportsRawCapture": false,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "sensorOrientation": "portrait",
  "isMultiCam": false,
  "minZoom": 1,
  "formats": [],
  "minFocusDistance": 10,
  "maxZoom": 16,
  "hasTorch": true,
  "hasFlash": true,
  "minExposure": -8,
  "name": "Caméra arrière",
  "id": "com.apple.avfoundation.avcapturedevice.built-in_video:0"
}

Device

iPhone 8 (IOS 16.7.8)

VisionCamera Version

4.4.2

Can you reproduce this issue in the VisionCamera Example app?

Yes, I can reproduce the same issue in the Example app here

Additional information

maintenance-hans[bot] commented 2 months ago

Guten Tag, Hans here.

[!NOTE] New features, bugfixes, updates and other improvements are all handled mostly by @mrousavy in his free time. To support @mrousavy, please consider 💖 sponsoring him on GitHub 💖. Sponsored issues will be prioritized.

medkhalifa-91 commented 2 months ago

I close this issue since it has been fixed in the 4.5.0 version.