Compare commits

..

No commits in common. 'master' and 'v0.12.0' have entirely different histories.

@ -1,9 +1,7 @@
quaggaJS
========
[![Join the chat at https://gitter.im/quaggaJS/Lobby](https://badges.gitter.im/quaggaJS/Lobby.svg)](https://gitter.im/quaggaJS/Lobby?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)
- [Changelog](#changelog) (2017-06-07)
- [Changelog](#changelog) (2017-06-06)
- [Browser Support](#browser-support)
- [Installing](#installing)
- [Getting Started](#gettingstarted)
@ -91,7 +89,7 @@ The above condition evaluates to:
| Chrome | `true` |
| Firefox | `true` |
| IE 11 | `false` |
| Safari iOS | `true` |
| Safari iOS | `false` |
## <a name="installing">Installing</a>
@ -705,13 +703,6 @@ on the ``singleChannel`` flag in the configuration when using ``decodeSingle``.
## <a name="changelog">Changelog</a>
### 2017-06-07
- Improvements
- added `muted` and `playsinline` to `<video/>` to make it work for Safari 11
Beta (even iOS)
- Fixes
- Fixed [example/live_w_locator.js](https://github.com/serratus/quaggaJS/blob/master/example/live_w_locator.js)
### 2017-06-06
- Features
- Support for Standard 2of5 barcodes (See

@ -1,6 +1,6 @@
{
"name": "quagga",
"version": "0.12.1",
"version": "0.6.14",
"description": "An advanced barcode-scanner written in JavaScript",
"main": "dist/quagga.js",
"ignore": [

6
dist/quagga.js vendored

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

@ -81,6 +81,7 @@ $(function() {
}
return;
}
node.parentNode.style.display = 'none';
},
initCameraSelection: function(){
var streamLabel = Quagga.CameraAccess.getActiveStreamLabel();

File diff suppressed because one or more lines are too long

@ -1,11 +1,9 @@
{
"name": "quagga",
"version": "0.12.1",
"version": "0.12.0",
"description": "An advanced barcode-scanner written in JavaScript",
"main": "lib/quagga.js",
"typings": "type-definitions/quagga.d.ts",
"browser": "dist/quagga.min.js",
"typings": "type-definitions/quagga.d.ts",
"devDependencies": {
"async": "^1.4.2",
"babel-cli": "^6.5.1",

@ -2,7 +2,7 @@ export default {
drawRect: function(pos, size, ctx, style){
ctx.strokeStyle = style.color;
ctx.fillStyle = style.color;
ctx.lineWidth = style.lineWidth || 1;
ctx.lineWidth = 1;
ctx.beginPath();
ctx.strokeRect(pos.x, pos.y, size.x, size.y);
},

@ -42,9 +42,7 @@ function initCamera(video, constraints) {
.then((stream) => {
return new Promise((resolve) => {
streamRef = stream;
video.setAttribute("autoplay", true);
video.setAttribute('muted', true);
video.setAttribute('playsinline', true);
video.setAttribute("autoplay", 'true');
video.srcObject = stream;
video.addEventListener('loadedmetadata', () => {
video.play();

@ -1,11 +1,9 @@
// Type definitions for QuaggaJS v0.12.1 (2017-10-19)
// Project: http://serratus.github.io/quaggaJS/
// Definitions by: Cam Birch, Peter Horwood aka Madman Pierre, Dan Manastireanu <https://github.com/danmana>
// Type definitions for QuaggaJS v2015.05.20 Project:
// http://serratus.github.io/quaggaJS/ Definitions by: Cam Birch, Peter
// Horwood aka Madman Pierre
declare module "quagga" {
var Quagga: QuaggaJSStatic;
export default Quagga;
}
declare var Quagga: QuaggaJSStatic;
export default Quagga;
interface QuaggaJSStatic {
/**
@ -74,7 +72,7 @@ interface QuaggaJSStatic {
ResultCollector: QuaggaJSResultCollector;
registerResultCollector(resultCollector: QuaggaJSResultCollector): void;
setReaders(readers: (QuaggaJSReaderConfig | string)[]): void;
setReaders(readers: any): void;
/**
* In contrast to the calls described
@ -110,24 +108,6 @@ interface QuaggaJSStatic {
overlay: HTMLCanvasElement
}
};
CameraAccess: QuaggaJSCameraAccess;
}
/**
* Used for accessing information about the active stream track and available video devices.
*/
interface QuaggaJSCameraAccess {
request(video: HTMLVideoElement, videoConstraints: QuaggaJSConstraints): Promise<void>;
release(): void;
enumerateVideoDevices(): Promise<MediaDeviceInfo[]>;
getActiveStreamLabel(): string;
getActiveTrack(): MediaStreamTrack;
}
/**
@ -237,7 +217,7 @@ interface QuaggaJSResultCollector {
/*
* a static function that returns you a ResultCollector
*/
create?(param: QuaggaJSResultCollector): QuaggaJSResultCollector;
create?(QuaggaJSResultCollector): QuaggaJSResultCollector;
getResults?(): QuaggaJSCodeResult[];
}
@ -311,9 +291,7 @@ interface QuaggaJSConfigObject {
* Ex: '/test/fixtures/code_128/image-001.jpg'
* or: 'data:image/jpg;base64,' + data
*/
src?: string;
inputStream?: {
src?: string; inputStream?: {
/**
* @default "Live"
*/
@ -323,10 +301,33 @@ interface QuaggaJSConfigObject {
* @default "LiveStream"
*/
type?: string;
target?: HTMLElement,
constraints?: QuaggaJSConstraints;
constraints?: {
/**
* @default 640
*/
width?: number;
/**
* @default 480
*/
height?: number;
/**
* In cases where height/width does not suffice
*/
aspectRatio?: number
/**
* @default "environment"
*/
facingMode?: string;
/**
* Explicitly set the camera to the user's choice
*/
deviceId?: string
};
/**
* defines rectangle of the detection/localization area. Useful when you
@ -379,19 +380,11 @@ interface QuaggaJSConfigObject {
*/
numOfWorkers?: number;
/**
* This top-level property controls the scan-frequency of the video-stream.
* Its optional and defines the maximum number of scans per second.
* This renders useful for cases where the scan-session is long-running and
* resources such as CPU power are of concern.
*/
frequency?: number;
decoder?: {
/**
* @default [ "code_128_reader" ]
*/
readers?: (QuaggaJSReaderConfig | string)[];
readers?: string[];
debug?: {
/**
@ -413,15 +406,7 @@ interface QuaggaJSConfigObject {
* @default false
*/
showPattern?: boolean;
};
/**
* The multiple property tells the decoder if it should continue decoding after finding a valid barcode.
* If multiple is set to true, the results will be returned as an array of result objects.
* Each object in the array will have a box, and may have a codeResult
* depending on the success of decoding the individual box.
*/
multiple?: boolean;
}
};
locator?: {
@ -491,40 +476,3 @@ interface QuaggaJSConfigObject {
}
};
}
interface QuaggaJSConstraints {
/**
* @default 640
*/
width?: number;
/**
* @default 480
*/
height?: number;
/**
* In cases where height/width does not suffice
*/
aspectRatio?: number
/**
* @default "environment"
*/
facingMode?: string;
/**
* Explicitly set the camera to the user's choice
*/
deviceId?: string
}
/**
* Used for extending a reader with supplements (ex: EAN-2, EAN-5)
*/
interface QuaggaJSReaderConfig {
format: string;
config: {
supplements: string[];
}
}

Loading…
Cancel
Save