Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

馃悰 outputOrientation not working in android but working properly in iOS. #3016

Open
3 of 5 tasks
gauravrana0-nagarro opened this issue Jun 24, 2024 · 4 comments
Open
3 of 5 tasks
Labels
馃悰 bug Something isn't working

Comments

@gauravrana0-nagarro
Copy link

gauravrana0-nagarro commented Jun 24, 2024

version 4

MicrosoftTeams-video.2.mp4

version 2
https://github.com/mrousavy/react-native-vision-camera/assets/125337945/e1bccae7-a526-4d8b-b690-c6c15756388e

What's happening?

in version 4.3.2 if I add outputOrientation = landscape-right prop it always takes images in the landscape mode in android but in version 2 it used to convert landscape-right image to portrait.
It is working same as in v2 in iOS

Reproduceable Code

<Camera
                ref={camera}
                style={StyleSheet.absoluteFill}
                device={device}
                outputOrientation="landscape-right"
                isActive={isFocused}
                photo={true}
                onError={onError}></Camera>

Relevant log output

06-24 15:53:09.953  6318 23920 I CameraLightSensor_Service: Open camera failed: error 2
06-24 15:53:09.953  6318 23920 I CameraLightSensor_Service: stopTask called, isCameraStopPending : false
06-24 15:53:09.954  6318 23920 I CameraLightSensor_Service: stopBackgroundThread : mBackgroundHandler is set to null
06-24 15:53:10.240  5362  5760 D NetdEventListenerService: DNS Requested by : 100, 10716, 0
06-24 15:53:10.468  5166 23637 E Camera2-FrameProcessorBase: FrameProcessorBase: Error waiting for new frames: Connection timed out (-110)
06-24 15:53:10.506  9219 10881 I SDHMS:C : SIOP:: AP:418(472,80) BAT:386(386,0) USB:0(0,0) CHG:458(458,0) WIFI:433(433,0) LRP:432(432,0) LRF:418(418) LRB:432(432) 
06-24 15:53:10.867  5026 23840 I ExynosCameraFrameManager: [CAM(0)][RUNNING FRAME WORKER]-(workerMain[983]): wait and pop fail, ret(-110)
06-24 15:53:11.028 18022 18053 I .msil.truevalu: Background young concurrent copying GC freed 338042(19MB) AllocSpace objects, 230(4600KB) LOS objects, 34% free, 45MB/69MB, paused 694us,121us total 104.740ms
06-24 15:53:11.494  5362  9315 I EDMNativeHelperService: isCameraEnabled
06-24 15:53:11.494  5362  9315 D EDMNativeHelper: isCameraEnabled
06-24 15:53:11.497  5362  9315 D EDMNativeHelper: checking for camera in EnterpriseDeviceManagerService
06-24 15:53:11.497  5362  9315 D EnterpriseDeviceManagerService: isCameraEnabledNative
06-24 15:53:11.497  5362  9315 D EnterpriseDeviceManagerService: checking for camera in restr

Camera Device

{
  "formats": [],
  "sensorOrientation": "landscape-left",
  "hardwareLevel": "limited",
  "maxZoom": 8,
  "minZoom": 1,
  "maxExposure": 20,
  "supportsLowLightBoost": false,
  "neutralZoom": 1,
  "physicalDevices": [
    "wide-angle-camera"
  ],
  "supportsFocus": true,
  "supportsRawCapture": false,
  "isMultiCam": false,
  "minFocusDistance": 10,
  "minExposure": -20,
  "name": "0 (BACK) androidx.camera.camera2",
  "hasFlash": true,
  "hasTorch": true,
  "position": "back",

Device

samsung m21

VisionCamera Version

4.3.1

Can you reproduce this issue in the VisionCamera Example app?

Yes (鈿狅笍 your issue might get ignored & closed if you don't try this)

Additional information

@gauravrana0-nagarro gauravrana0-nagarro added the 馃悰 bug Something isn't working label Jun 24, 2024
@maintenance-hans maintenance-hans bot changed the title outputOrientation not working in android but working properly in iOS. 馃悰 outputOrientation not working in android but working properly in iOS. Jun 24, 2024
Copy link

maintenance-hans bot commented Jun 24, 2024

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.

@SonuGitCfcs
Copy link

same issue on Redmi Note 7 Pro device & Some Samsung device

@gauravrana0-nagarro
Copy link
Author

gauravrana0-nagarro commented Jun 24, 2024

I just installed shadow lens app on my android device. the same issue is in Shadow Lens app also. It stores image in landscape mode if clicked closely and in portrait if clicked from some distance.
In v2 the landscape image also got rotated to portrait in landscape-right orientation. In v4 it is not the same.
NOTE: device orientation is locked to portrait

@Marius-Adam
Copy link

I have same issue on IOS

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
馃悰 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants