Scan Barcode from computer webcam and mobile camera

Hi,

I want to know if there are any html5 and javascript api available to scan barcode from camera. I do not want to build a native app. The web app should be able to open pc camera and scan barcode information.

Thanks.

There is the Camera API

https://developer.mozilla.org/en-US/docs/Mozilla/B2G_OS/API/Camera_API/Introduction

AFAIK no desktop support but there are a few mobile browsers that do
Android
Chrome for Android
Firefox Mobile (Gecko)

Hi,

I want it webcam to work like a bar code reader. It should be able to scan and provide details to back-end.
Do we have any thing like that.

I think the Camera API is going to be the closet thing to what I think you’re looking for.

Allowing a web page access to a users camera / microphone / printer / etc. has major security concerns.

So it isn’t likely to be possible unless a user explicitly chooses to allow it.

There are quite a few applications that a user can install to scan barcodes eg.

It looks like quaggaJS can scan barcodes directly from the camera.

And, so far as an API goes, Google has a Barcode API.

Okay…I have a changed scenario now.

A bluetooth handheld scanner is available. Now I need to integrate in the following way:

  • website page asks for barcode - number

  • the handheld scanner should scan it and then pass it to website via bluetooth

So do we have a javascript that can get data from handheld scanner in the above manner.

Thanks a ton in advance.

The added requirements don’t really change anything. The bluetooth part is separate from the web part and the integration should be handled by the native drivers provided from the manufacturers of the camera.

1 Like

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.