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

Remove that=this, not needed

parent 9510f224
No related branches found
No related tags found
No related merge requests found
...@@ -89,7 +89,6 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) { ...@@ -89,7 +89,6 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
* *
*/ */
async checkSupport() { async checkSupport() {
const that = this;
let devices_map = new Map(); let devices_map = new Map();
if (navigator.mediaDevices if (navigator.mediaDevices
&& navigator.mediaDevices.enumerateDevices && navigator.mediaDevices.enumerateDevices
...@@ -117,21 +116,21 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) { ...@@ -117,21 +116,21 @@ export class QrCodeScanner extends ScopedElementsMixin(DBPLitElement) {
} }
if (devices_map.size < 1) { if (devices_map.size < 1) {
that.notSupported = true; this.notSupported = true;
} }
for (let [id, label] of devices_map) { for (let [id, label] of devices_map) {
let opt = document.createElement("option"); let opt = document.createElement("option");
opt.value = id; opt.value = id;
opt.text = label; opt.text = label;
that._('#videoSource').appendChild(opt); this._('#videoSource').appendChild(opt);
} }
if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) { if (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(navigator.userAgent)) {
that.activeCamera = 'environment'; this.activeCamera = 'environment';
} else { } else {
that.activeCamera = devices_map.size ? Array.from(devices_map)[0][0] : ''; this.activeCamera = devices_map.size ? Array.from(devices_map)[0][0] : '';
} }
} else { } else {
that.notSupported = true; this.notSupported = true;
} }
} }
......
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