fix: clear black bg after camera capture

This commit is contained in:
yugasun
2019-01-15 11:53:37 +08:00
parent 9633aafc01
commit 70c701a9b5
5 changed files with 7 additions and 4 deletions
Binary file not shown.
Binary file not shown.

Before

Width:  |  Height:  |  Size: 935 B

After

Width:  |  Height:  |  Size: 3.4 KiB

+3 -3
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1,6 +1,6 @@
{ {
"name": "qrcode-decoder", "name": "qrcode-decoder",
"version": "0.1.0", "version": "0.1.1",
"description": "Tool for decoding qrcode", "description": "Tool for decoding qrcode",
"main": "dist/index.js", "main": "dist/index.js",
"jsnext:main": "dist/index.esm.js", "jsnext:main": "dist/index.esm.js",
+3
View File
@@ -306,6 +306,9 @@ class QrcodeDecoder {
const track = this.stream.getTracks()[0]; const track = this.stream.getTracks()[0];
track.stop(); track.stop();
this.stream = undefined; this.stream = undefined;
// fix: clear black bg after camera capture
this.videoElem.srcObject = null;
} }
if (this.timerCapture) { if (this.timerCapture) {