I was wondering if there is a way to develop a cross-platform HTML 5 app that can scan QR and or bar codes with the phone's camera. Some of the answers I have seen are a few years old now and so I am hoping this technology has improved. None of the demos that were mentioned, such as http://webqr.com http://dwa012.github.io/html5-qrcode http://www.themedone.com/qr-scanner-generator/scan.html worked on my iPhone 4. Thank you.
2 Answers
Although this question is rather old, there appeared a number of technologies that may be used to scan QR/bar codes in the browser efficiently. For example, WASM or WebAssembly. Here are a couple of nice articles on this technology:
To summarise, one could make use of the zbar C/C++ library and transpile it to WebAssembly (which is supported by all major browsers) using Emscripten.
Here is my attempt to solve this (works well on iOS and Android):
Another approach would be to use some kind of JavaScript library, e.g. jsQR. This solution is not as performant compared to WASM, so you can try to offload your Browser's Main thread by using a Web worker.

- 2,903
- 3
- 28
- 50
The hard part of this question looks like it has a solution here:
Capturing camera/picture data without PhoneGap
I was able to connect to a html page on my web server with this code and take photos with both Safari and Chrome on my iPhone 4.

- 1,913
- 5
- 26
- 49