Skip to content

Commit

Permalink
Fix #46: Make backgroundScan default to true.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmich committed Apr 26, 2017
1 parent c83bc28 commit a451393
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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).
Expand Down
2 changes: 1 addition & 1 deletion src/scanner.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit a451393

Please sign in to comment.