dwa012 / html5-qrcode

A cross platform HTML5 QR code reader.
747 stars 306 forks source link

not work on android and ios #7

Open KupueIIIKo opened 10 years ago

KupueIIIKo commented 10 years ago

doesn't work at android and ios

enriquetuya commented 10 years ago

I've submitted some changes so it works on Android: https://github.com/enriquetuya/html5-qrcode, the demo is not updated, you can try them out locally.

On iOS it will not work on Safari since it does not support WebRTC yet and on chrome for ios I think it won't work neither since ios does not provide access to the camera.

nikswap commented 9 years ago

@enriquetuya Your version reports this for the not compiled version: qrcode.callback = qrcodeSuccess; in line 118. But the camera works on android!

nikswap commented 9 years ago

@enriquetuya solved the problem. Just needed to compile. However after compiling do I get this error:

IndexError: "Failed to execute 'getImageData' on 'CanvasRenderingContext2D': The source width is 0."

My compile script: type src\jsqrcode\src\grid.js src\jsqrcode\src\version.js src\jsqrcode\src\detector.js src\jsqrcode\src\formatinf.js src\jsqrcode\src\errorlevel.js src\jsqrcode\src\bitmat.js src\jsqrcode\src\datablock.js src\jsqrcode\src\bmparser.js src\jsqrcode\src\datamask.js src\jsqrcode\src\rsdecoder.js src\jsqrcode\src\gf256poly.js src\jsqrcode\src\gf256.js src\jsqrcode\src\decoder.js src\jsqrcode\src\QRCode.js src\jsqrcode\src\findpat.js src\jsqrcode\src\alignpat.js src\jsqrcode\src\databr.js src\html5-qrcode.js > html5-qrcode.js

I could not get uglify to work proberly, so I just cat'ed all the files together.

faizanyasin commented 7 years ago

Thanks @enriquetuya it really does work