Skip to content

Commit

Permalink
fix: clear black bg after camera capture
Browse files Browse the repository at this point in the history
  • Loading branch information
yugasun committed Jan 15, 2019
1 parent 9633aaf commit 70c701a
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
Binary file modified demo/assets/qrcode-video.mp4
Binary file not shown.
Binary file modified demo/assets/qrcode.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions demo/index.aio.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
@@ -1,6 +1,6 @@
{
"name": "qrcode-decoder",
"version": "0.1.0",
"version": "0.1.1",
"description": "Tool for decoding qrcode",
"main": "dist/index.js",
"jsnext:main": "dist/index.esm.js",
Expand Down
3 changes: 3 additions & 0 deletions src/index.js
Expand Up @@ -306,6 +306,9 @@ class QrcodeDecoder {
const track = this.stream.getTracks()[0];
track.stop();
this.stream = undefined;

// fix: clear black bg after camera capture
this.videoElem.srcObject = null;
}

if (this.timerCapture) {
Expand Down

0 comments on commit 70c701a

Please sign in to comment.