dwa012 / html5-qrcode

A cross platform HTML5 QR code reader.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

not work on android and ios

KupueIIIKo opened this issue · comments

doesn't work at android and ios

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.

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

@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.

Thanks @enriquetuya it really does work