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

Samsung Galaxy S22 rear camera cannot be selected properly #603

Open
Amilmaho opened this issue Jun 11, 2024 · 1 comment
Open

Samsung Galaxy S22 rear camera cannot be selected properly #603

Amilmaho opened this issue Jun 11, 2024 · 1 comment
Labels

Comments

@Amilmaho
Copy link

Hi there!

I'm using a Samsung Galaxy S22, and I noticed that the default rear camera is the wide-angle lens.

I've tried selecting the camera using the deviceId, but it still defaults to the wide-angle camera.

How can I set it to use the main camera instead?

Thanks in advance!

  const devices = await navigator.mediaDevices.enumerateDevices();
  const videoDevices = devices.filter((device) => device.kind === 'videoinput');

  let rearCamera = videoDevices[2];
  
  if (videoRef.current && rearCamera) {
    codeReaderRef.decodeFromVideoDevice(
      rearCamera.deviceId,
      videoRef.current,
      (result, err) => {
        if (result) {
          qRCodeAPIIntegration(result.text);
          const uint8String = toUint8String(result.getRawBytes());
          console.log(uint8String);
        }
      ...
@hardcoreusers
Copy link

Terabox Cloud Storage has made managing my files so much easier. I no longer have to worry about running out of space on my phone. The free 1TB storage is more than enough for all my photos and videos, and it’s great that I can access them from anywhere so get Terabox mod apk that allow free resources for everyone..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants