react-qr-reader icon indicating copy to clipboard operation
react-qr-reader copied to clipboard

Camera not opening to scan the qr code in new version 3 beta version.

Open gcanup opened this issue 3 years ago • 7 comments

  • Tried to test the live demo and it didn't open camera.
  • Also, tried to use it in my react project, happens the same.

gcanup avatar Sep 06 '22 13:09 gcanup

same here! Actually it works in chrome (OS X) but I cannot get any image on my iphone (tested withIOS 15.6.1 in safari and mobile chrome)

mitsol avatar Sep 10 '22 07:09 mitsol

UPDATE: Try HTTPS! Camera permission may only be available with HTTPS and not HTTP.

Same, the demo gives the error

undefined is not an object (evaluating 'navigator.mediaDevices.getUserMedia')

I suspect it has something to do with some recent iOS updates, because I definitely remember the same code worked before.

larry0x avatar Sep 22 '22 22:09 larry0x

Same here. Permission granted, but window does not open in iPhone. Neither Safari nor Chrome. May website is on https.

j4nos avatar Oct 31 '22 11:10 j4nos

It works using HTTPS

aelfannir avatar Jan 16 '23 12:01 aelfannir

@aelfannir i am using this for a project i am able to scan through the frontCamera but not able to open the rare camera what should i do

Karanpal97 avatar Jan 16 '24 17:01 Karanpal97

Hi everyone,

I hope this message finds you well. I am currently facing an issue with the QR scanner in my project. While I am able to successfully scan using the front camera, I am encountering difficulties in accessing the rear camera.

Here is the relevant code snippet:

jsx

<QrScanner onScan={handleScan} onError={handleError} style={{ width: '100%' }} facingMode="rare" />

Despite setting facingMode to "rare," the scanner continues to use the front camera.

I would greatly appreciate any insights or suggestions on how to resolve this issue and ensure the QR scanner utilizes the rear camera as intended.

Thank you in advance for your assistance.

Karanpal97 avatar Jan 16 '24 17:01 Karanpal97

Hi everyone,

I hope this message finds you well. I am currently facing an issue with the QR scanner in my project. While I am able to successfully scan using the front camera, I am encountering difficulties in accessing the rear camera.

Here is the relevant code snippet:

jsx

<QrScanner onScan={handleScan} onError={handleError} style={{ width: '100%' }} facingMode="rare" />

Despite setting facingMode to "rare," the scanner continues to use the front camera.

I would greatly appreciate any insights or suggestions on how to resolve this issue and ensure the QR scanner utilizes the rear camera as intended.

Thank you in advance for your assistance.

facingMode must be "environment" for back camera.

mk48 avatar Jan 25 '24 13:01 mk48