1

I've found a very simple yet working fine QRcode generator plugin that works in pure jQuery. The plugin's name is jquery.qrcode.

Here is how it works when given a url:

 function showQR(url) {
        $('#qrcode').qrcode({
            "width": 100,
            "height": 100,
            "color": "#3a3",
            "text": url
        });

    }

Quite simple, huh?

Now when I search the web for a similar html5 QRcode reader all I can find is references to Lazarsoft jsqrcode.js with accompanying getUserMedia which is not available on iPhone (AFAIK).

Besides there are lots of caveats explaining that it is not working properly, and so on...

What I need is a jq plugin that will smoothly acces the phone's camera, tune the focus to a QRcode and return the corresponding url, no fuss, no mess.

Any clue?

user3553401
  • 99
  • 1
  • 12
  • May not help, but you may try [this answer](http://stackoverflow.com/a/13489553/570812) to obtain an image in iOS. – Passerby Apr 22 '15 at 10:28
  • As Passerby pointed out, there is the picture from camera input method which works everywhere. You can use the getUserMedia on browsers supporting it, and fallback to this technique for iPhones. Once you got the pic, you can use the fileReader API (supported on iOS) to do your QR scanning – Rayjax Apr 30 '15 at 07:59

1 Answers1

0

As Passerby pointed out, there is the picture from camera input method which works everywhere. You can use the getUserMedia on browsers supporting it, and fallback to this technique for iPhones. Once you got the pic, you can use the fileReader API (supported on iOS) to do your QR scanning

Rayjax
  • 6,614
  • 11
  • 54
  • 77