Merge pull request #23825 from ulvido:4.x

if browser supports wasm but only asm.js path provided use asm.js as fallback
pull/23833/head
Alexander Smorkalov 2 years ago committed by GitHub
commit 726ba0210e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 5
      modules/js/src/loader.js

@ -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 === "") {

Loading…
Cancel
Save