-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Open
Labels
π bugSomething isn't workingSomething isn't working
Description
What's happening?
Hi, In our app is running in iPad with landscape left & right orientation only. When Vision camera is opened for 1st time, preview is displayed in a different direction and after the movement of the device, showing correct direction.
I tried latest version of the vision camera - 4.7.3 and still seeing the issue.
Reproduceable Code
In componentDidMount:
const devices = Camera.getAvailableCameraDevices()
this._device = getCameraDevice(devices, 'back')
this._cameraFormat = getCameraFormat(this._device, [
{ photoResolution: { width: 1024, height: 1365 } }
])
In render
<Camera
ref={this._camera}
device={this._device}
style={this.state.styles.preview}
isActive={this.state.isActive}
photo={true}
zoom={this.state.zoomLevel}
format={this._cameraFormat}
outputOrientation={'device'}
resizeMode={'contain'}
/>Relevant log output
11:54:08.918: [info] πΈ VisionCamera.constantsToExport(): Found 2 initial Camera Devices.
11:54:11.264: [info] πΈ VisionCamera.didSetProps(_:): Updating 26 props: [onInitialized, cameraId, alignItems, enableBufferCompression, preview, justifyContent, onCodeScanned, onOutputOrientationChanged, onStarted, isActive, isMirrored, resizeMode, onError, onStopped, onViewReady, onPreviewOrientationChanged, onPreviewStopped, enableFrameProcessor, onPreviewStarted, format, flex, outputOrientation, width, zoom, photo, onShutter]
11:54:11.269: [info] πΈ VisionCamera.configurePreviewOrientation(_:): Updating Preview rotation: portrait...
11:54:11.270: [info] πΈ VisionCamera.configureOutputOrientation(_:): Updating Outputs rotation: portrait...
11:54:11.270: [info] πΈ VisionCamera.configure(_:): configure { ... }: Waiting for lock...
11:54:11.276: [info] πΈ VisionCamera.configure(_:): configure { ... }: Updating CameraSession Configuration... Difference(inputChanged: true, outputsChanged: true, videoStabilizationChanged: true, orientationChanged: true, formatChanged: true, sidePropsChanged: true, torchChanged: true, zoomChanged: true, exposureChanged: true, audioSessionChanged: true, locationChanged: true)
11:54:11.277: [info] πΈ VisionCamera.configureDevice(configuration:): Configuring Input Device...
11:54:11.277: [info] πΈ VisionCamera.configureDevice(configuration:): Configuring Camera com.apple.avfoundation.avcapturedevice.built-in_video:0...
11:54:11.288: [info] πΈ VisionCamera.didSetProps(_:): Updating 1 props: [isActive]
11:54:11.288: [info] πΈ VisionCamera.configure(_:): configure { ... }: Waiting for lock...
11:54:11.301: [info] πΈ VisionCamera.configureDevice(configuration:): Successfully configured Input Device!
11:54:11.301: [info] πΈ VisionCamera.configureOutputs(configuration:): Configuring Outputs...
11:54:11.301: [info] πΈ VisionCamera.configureOutputs(configuration:): Adding Photo output...
11:54:11.306: [info] πΈ VisionCamera.configurePreviewOrientation(_:): Updating Preview rotation: portrait...
11:54:11.306: [info] πΈ VisionCamera.configureOutputOrientation(_:): Updating Outputs rotation: portrait...
11:54:11.306: [info] πΈ VisionCamera.configureOutputs(configuration:): Successfully configured all outputs!
11:54:11.309: [info] πΈ VisionCamera.setTargetOutputOrientation(_:): Setting target output orientation from device to device...
11:54:11.311: [info] πΈ VisionCamera.configureFormat(configuration:device:): Configuring Format (1280x720 | [email protected] (ISO: 24.0..768.0))...
11:54:11.312: [info] πΈ VisionCamera.didSetProps(_:): Updating 1 props: [isActive]
11:54:11.323: [info] πΈ VisionCamera.configure(_:): configure { ... }: Waiting for lock...
11:54:11.329: [info] πΈ VisionCamera.configureFormat(configuration:device:): Successfully configured Format!
11:54:11.345: [debug] πΈ VisionCamera.deviceOrientation: Device Orientation changed from portrait -> landscapeLeftCamera Device
{
"isMultiCam": false,
"maxZoom": 95.625,
"minFocusDistance": 10,
"hardwareLevel": "full",
"physicalDevices": [
"wide-angle-camera"
],
"supportsRawCapture": false,
"supportsFocus": true,
"neutralZoom": 1,
"id": "com.apple.avfoundation.avcapturedevice.built-in_video:0",
"name": "Back Camera",
"hasFlash": false,
"minExposure": -8,
"minZoom": 1,
"sensorOrientation": "portrait",
"maxExposure": 8,
"supportsLowLightBoost": false,
"position": "back",
"formats": [],
"hasTorch": false
}Device
Ipad (6th generation) with 17.7.10. Happening in other iPads also.
VisionCamera Version
4.7.3
Can you reproduce this issue in the VisionCamera Example app?
Yes, I can reproduce the same issue in the Example app here
Additional information
- I am using Expo
- I have enabled Frame Processors (react-native-worklets-core)
- I have read the Troubleshooting Guide
- I agree to follow this project's Code of Conduct
- I searched for similar issues in this repository and found none.
ipad_vison_camera_landscape_issue_2.mp4
Metadata
Metadata
Assignees
Labels
π bugSomething isn't workingSomething isn't working