diff --git a/README.md b/README.md index 5d6e4b2f..07d25eb9 100644 --- a/README.md +++ b/README.md @@ -82,8 +82,8 @@ let opts = { captureImage: false, // Only applies to continuous mode. Whether to actively scan when the tab is not active. - // When false, this reduces CPU usage when the tab is not active. Default false. - backgroundScan: false, + // When false, this reduces CPU usage when the tab is not active. Default true. + backgroundScan: true, // Only applies to continuous mode. The period, in milliseconds, before the same QR code // will be recognized in succession. Default 5000 (5 seconds). diff --git a/src/scanner.js b/src/scanner.js index 7d3173f9..1e2f169f 100644 --- a/src/scanner.js +++ b/src/scanner.js @@ -162,7 +162,7 @@ class Scanner extends EventEmitter { this.video = this._configureVideo(opts); this.mirror = (opts.mirror !== false); - this.backgroundScan = opts.backgroundScan || false; + this.backgroundScan = (opts.backgroundScan !== false); this._continuous = (opts.continuous !== false); this._analyzer = new Analyzer(this.video); this._camera = null;