QuaggaJS offers JavaScript-based barcode scanning

The library supports real-time localization and decodes barcodes like EAN and Code128

JavaScript, more commonly known for its dominance in client-side Web application development, is being extended to the realm of barcode scanners. With QuaggaJS, a developer in Austria is developing a barcode scanner written in JavaScript and supporting real-time localization as well as decoding of barcodes like EAN and Code128.

The idea for QuaggaJS arose after developer Christoph Oberhofer was asked to input a voucher code into a Web form. "The voucher itself was printed and also had a Code1 28 barcode encoded on it, which can be scanned when redeemed at a retail store. I wanted something that makes the process more interactive and fun, especially when used on a mobile phone." He added he had already implemented a proof of concept of a JavaScript-based augmented reality framework before.

Barcode scanner libraries Oberhofer has looked at were mostly written in C/C++ or Java. There already has been a JavaScript-based barcode library, zgingjs, he notes. QuaggaJS, however is intended to offer an advantage in its ability to locate a barcode within an image. "Most, if not all, current JavaScript implementations do not offer such a functionality," said Oberhofer, who is a mobile Web application developer at Netconomy but develops QuaggaJS in his free time.

QuaggaJS serves as an extension to the zxing library for barcode image processing. For browsers to take full advantage of QuaggaJS, they must support the getUserMedia API. QuaggaJS works on smartphones out of the box, but the getUserMedia API only works on Android phones with Chrome or Firefox installed, said Oberhofer. He considers open source QuaggaJS to be at a first public beta stage of development.

Join the Computerworld newsletter!

Error: Please check your email address.

Tags QuaggaJSsoftwarejavascript

More about

Show Comments