QuaggaJS

An advanced barcode-scanner written in JavaScript

The user's camera

If your platform supports the getUserMedia API call, you can try the real-time locating and decoding features. Simply allow the page to access your web-cam and point it to a barcode. You can switch between Code128 and EAN to test different scenarios. It works best if your camera has built-in auto-focus.