diff --git a/hello-world/angular/angular.json b/hello-world/angular/angular.json index 7dce69c2..2b52d1d2 100644 --- a/hello-world/angular/angular.json +++ b/hello-world/angular/angular.json @@ -27,7 +27,8 @@ "styles": [ "src/styles.css" ], - "scripts": [] + "scripts": [], + "baseHref": "./" }, "configurations": { "production": { diff --git a/hello-world/react-hooks/package.json b/hello-world/react-hooks/package.json index b35e391d..fd2f1718 100644 --- a/hello-world/react-hooks/package.json +++ b/hello-world/react-hooks/package.json @@ -1,7 +1,8 @@ { - "name": "dbrjs-react-sample", + "name": "dbrjs-react-hook-sample", "version": "0.1.0", "private": true, + "homepage": "./", "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0", diff --git a/hello-world/react-hooks/src/components/VideoCapture/VideoCapture.tsx b/hello-world/react-hooks/src/components/VideoCapture/VideoCapture.tsx index 2a16f529..0372f96b 100644 --- a/hello-world/react-hooks/src/components/VideoCapture/VideoCapture.tsx +++ b/hello-world/react-hooks/src/components/VideoCapture/VideoCapture.tsx @@ -86,11 +86,10 @@ function VideoCapture() { alert(errMsg); } } + // Resolve pInit promise once initialization is complete. + resolveInit!(); })(); - // Resolve pInit promise once initialization is complete. - resolveInit!(); - // componentWillUnmount. dispose cvRouter when it's no longer needed return async () => { isDestroyed = true; @@ -99,13 +98,13 @@ function VideoCapture() { await pInit; cvRouter?.dispose(); cameraEnhancer?.dispose(); - } catch (_) {} + } catch (_) { } }; }, []); return (
-
+

Results:
diff --git a/hello-world/react/package.json b/hello-world/react/package.json index ccb3e6f7..517ff62a 100644 --- a/hello-world/react/package.json +++ b/hello-world/react/package.json @@ -2,6 +2,7 @@ "name": "dbrjs-react-sample", "version": "0.1.0", "private": true, + "homepage": "./", "dependencies": { "@testing-library/jest-dom": "^5.17.0", "@testing-library/react": "^13.4.0",