jamenamcinteer / react-qr-barcode-scanner

A simple React Component using the client's webcam to read barcodes.
75 stars 74 forks source link

Camera is not opening in Localhost #42

Closed mohdhaider07 closed 3 days ago

mohdhaider07 commented 1 year ago

https://user-images.githubusercontent.com/86488954/217037192-55643fa8-e4b9-4de4-b93b-ffad0d772e57.mp4

I am not able to open camera on localhost but when I am trying to open after deployment it is working fine.

On localhost Also getting lots of waning image

mohdhaider07 commented 1 year ago

@jamenamcinteer please reply ASAP

saicherry93479 commented 1 year ago

@mohdhaider07 you got solution for the issue.I am also facing same issue

mohdhaider07 commented 1 year ago

@mohdhaider07 you got solution for the issue.I am also facing same issue

It will work on https not on http

karastras commented 1 year ago

@mohdhaider07

It works on https and localhost too.

For your warnings issues , u can overide the @zing dependency to the v0.20.0 It fixes all the source.map warnings.

https://stackoverflow.com/questions/15806152/how-do-i-override-nested-npm-dependency-versions https://stackoverflow.com/questions/40226639/how-do-i-override-nested-dependencies-with-yarn

https://github.com/zxing-js/library

jamenamcinteer commented 3 days ago

It will only work over https, so you must configure your localhost to be served over https.