if browser supports wasm but only asm.js path provided use asm.js as fallback

This commit is contained in:
Ulvi YELEN 2023-06-17 09:38:57 +03:00 committed by GitHub
parent f2f00259da
commit d6d15c136a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -73,6 +73,11 @@ async function loadOpenCV(paths, onloadCallback) {
console.log("The OpenCV.js for wasm is loaded now");
} else if (wasmSupported) {
console.log("The browser supports wasm, but the path of OpenCV.js for wasm is empty");
if (asmPath != "") {
OPENCV_URL = asmPath;
console.log("The OpenCV.js for Asm.js is loaded as fallback.");
}
}
if (OPENCV_URL === "") {