jsqr
Advanced tools
Comparing version 1.0.2 to 1.0.3
{ | ||
"name": "jsqr", | ||
"version": "1.0.2", | ||
"version": "1.0.3", | ||
"description": "A pure javascript QR code reading library that takes in raw images and will locate, extract and parse any QR code found within.", | ||
@@ -26,2 +26,3 @@ "repository": "https://github.com/cozmo/jsQR", | ||
"jest": "^20.0.4", | ||
"rimraf": "^2.6.2", | ||
"ts-jest": "^20.0.14", | ||
@@ -35,2 +36,3 @@ "ts-node": "^3.3.0", | ||
"scripts": { | ||
"prebuild": "rimraf dist", | ||
"build": "./node_modules/.bin/webpack", | ||
@@ -37,0 +39,0 @@ "watch": "./node_modules/.bin/webpack --watch", |
@@ -13,4 +13,7 @@ # jsQR | ||
### NodeJS | ||
### NPM | ||
Available [on npm](https://www.npmjs.com/package/jsqr). Can be used in a Node.js program or with a module bundler such as Webpack or Browserify. | ||
``` | ||
@@ -31,5 +34,4 @@ npm install jsqr --save | ||
### Browser | ||
Alternatively for frontend use [`jsQR.js`](./dist/jsQR.js) can be included with a script tag | ||
Include [`jsQR.js`](./dist/jsQR.js). | ||
```html | ||
@@ -42,2 +44,7 @@ <script src="jsQR.js"></script> | ||
### A note on webcams | ||
jsQR is designed to be a completely standalone library for scanning QR codes. By design it does not include any platform specific code. This allows it to just as easily scan a frontend webcam stream, a user uploaded image, or be used as part of a backend Node.js process. | ||
If you want to use jsQR to scan a webcam stream you'll need to extract the [`ImageData`](https://developer.mozilla.org/en-US/docs/Web/API/ImageData) from the video stream. This can then be passed to jsQR. The [jsQR demo](https://cozmo.github.io/jsQR) contains a barebones implementation of webcam scanning that can be used as a starting point and customized for your needs. For more advanced questions you can refer to the [`getUserMedia` docs](https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia) or the fairly comprehensive [webRTC sample code](https://github.com/webrtc/samples), both of which are great resources for consuming a webcam stream. | ||
## Usage | ||
@@ -44,0 +51,0 @@ |
272524
103
13
17
10044