Paul Krill
Editor at Large

QuaggaJS offers JavaScript-based barcode scanning

news
Dec 4, 20142 mins

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.

Paul Krill

Paul Krill is editor at large at InfoWorld. Paul has been covering computer technology as a news and feature reporter for more than 35 years, including 30 years at InfoWorld. He has specialized in coverage of software development tools and technologies since the 1990s, and he continues to lead InfoWorld’s news coverage of software development platforms including Java and .NET and programming languages including JavaScript, TypeScript, PHP, Python, Ruby, Rust, and Go. Long trusted as a reporter who prioritizes accuracy, integrity, and the best interests of readers, Paul is sought out by technology companies and industry organizations who want to reach InfoWorld’s audience of software developers and other information technology professionals. Paul has won a “Best Technology News Coverage” award from IDG.

More from this author