This commit is contained in:
iqudoo
2026-04-30 18:12:39 +08:00
parent 8eef0c1867
commit 46bd158b93
7 changed files with 33 additions and 19 deletions

View File

@@ -294,7 +294,8 @@ export function isSupportWebScan() {
return typeof navigator !== 'undefined'
&& navigator.mediaDevices
&& navigator.mediaDevices.getUserMedia
&& !!getBarcodeDetectorClass();
&& !!getBarcodeDetectorClass()
&& getConfig("webScanEnabled") !== false;
}
export function isSupportImageScan() {
@@ -397,7 +398,7 @@ export function startScanForWeb(canvasStyle, onResult) {
let videoEl = createEl("video",
"__webscan_video__",
"display: none", false);
let canvasEnabled = getConfig("webCanvasEnabled") !== false;
let canvasEnabled = getConfig("webScanCanvasEnabled") !== false;
let canvasDisplay = "";
let canvasBaseStyle = canvasStyle || "position: fixed; width: 300px; height: 300px; top: 0; left: 0; z-index: 9999;";
let canvasEl = createEl("canvas",