Skip to content
Snippets Groups Projects
Commit c7275e90 authored by Reiter, Christoph's avatar Reiter, Christoph :snake:
Browse files

qr-code-scanner: remove jsqr usage

We no logner use that library and the "qr-scanner" altternative turned out to
be better, so remove it completely.
parent 05bee3f2
No related branches found
No related tags found
No related merge requests found
......@@ -31,7 +31,6 @@
"@open-wc/scoped-elements": "^1.1.1",
"async-mutex": "^0.2.4",
"dbp-common": "^1.0.0",
"jsqr": "^1.3.1",
"lit-element": "^2.3.1",
"qr-scanner": "^1.2.0"
},
......
......@@ -6,7 +6,6 @@ import {ScopedElementsMixin} from '@open-wc/scoped-elements';
import {Icon, MiniSpinner} from 'dbp-common';
import {classMap} from 'lit-html/directives/class-map.js';
import * as commonUtils from 'dbp-common/utils';
import jsQR from "jsqr";
import {getIconSVGURL} from 'dbp-common';
import {Mutex} from 'async-mutex';
import QrScanner from 'qr-scanner';
......@@ -102,23 +101,6 @@ async function createVideoElement(deviceId) {
return null;
}
class jsQRScanner { // eslint-disable-line no-unused-vars
constructor() {
}
async scan(canvas, x, y, width, height) {
let imageData = canvas.getContext("2d").getImageData(x, y, width, height);
const code = jsQR(imageData.data, imageData.width, imageData.height, {
inversionAttempts: "dontInvert",
});
if (code === null)
return null;
return {'data': code.data};
}
}
class QRScanner {
constructor() {
QrScanner.WORKER_PATH = commonUtils.getAssetURL('qr-code-scanner', 'qr-scanner-worker.min.js');
......
......@@ -5062,11 +5062,6 @@ jsprim@^1.2.2:
json-schema "0.2.3"
verror "1.10.0"
jsqr@^1.3.1:
version "1.3.1"
resolved "https://registry.yarnpkg.com/jsqr/-/jsqr-1.3.1.tgz#515a766e58b00c80142f3a2dc4b8751100ceedcf"
integrity sha512-zCTP6Qd/WwjrpuHFkJuXc5opRdKprUr7eI7+JCCtcetThJt45qptu82MWQ+eET+FtDrMo7+BYjo3iD0XIq1L9Q==
jszip@^3.2.2, jszip@^3.5.0:
version "3.5.0"
resolved "https://registry.yarnpkg.com/jszip/-/jszip-3.5.0.tgz#b4fd1f368245346658e781fec9675802489e15f6"
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment