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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🐛 Camera orientation not working to barcode #3321

Open
3 of 5 tasks
Ferreiraguihh opened this issue Dec 5, 2024 · 1 comment
Open
3 of 5 tasks

🐛 Camera orientation not working to barcode #3321

Ferreiraguihh opened this issue Dec 5, 2024 · 1 comment
Labels
🐛 bug Something isn't working

Comments

@Ferreiraguihh
Copy link

What's happening?

Basically, I'm using a device like a tablet, and I can't change the orientation of the component, I'm trying to use barcode, I know that in the 'react-native-camera' library, if I implement a rotate -90deg it works.
image

Reproduceable Code

const { onCodeScanned } = props;
  const device = useCameraDevice('back');
  const cameraRef = useRef<Camera>(null);

  const codeScanner = useCodeScanner({
    codeTypes: ['ean-13', 'upc-a'],
    onCodeScanned,
  });

  if (!device) {
    return null;
  }

<View>
<Camera
          ref={cameraRef}
          device={device}
          style={StyleSheet.absoluteFill}
          isActive={true}
          codeScanner={codeScanner}
          resizeMode="cover"
        />
</View>

Relevant log output

.

Camera Device

Device: 'Back'

Device

Tablet Pixel Android 12.0

VisionCamera Version

4.6.3

Can you reproduce this issue in the VisionCamera Example app?

I didn't try (⚠️ your issue might get ignored & closed if you don't try this)

Additional information

@Ferreiraguihh Ferreiraguihh added the 🐛 bug Something isn't working label Dec 5, 2024
Copy link

Guten Tag, Hans here! 🍻

It sounds like you are having trouble with camera orientation for barcode scanning. However, I noticed you did not include any relevant log output, which is important for diagnosing the issue.

Please provide logs from adb logcat when you run your app. This will help mrousavy to better understand what’s going wrong. Also, make sure to double-check that you tested this in the VisionCamera Example app, as mentioned.

If you continue to have troubles, feel free to update this issue with the necessary details! Thank you for your understanding, and don’t forget to support the project by sponsoring if you find it helpful!

Note: If you think I made a mistake, please ping @mrousavy to take a look.

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

1 participant