In applications that share the same Azure App Service, the camera may not open properly. This is usually because the file import paths for JavaScript files are not resolved correctly in that environment.
To resolve this, you need to modify the imports in the library's JavaScript file by adding a period (.) at the beginning of the path to make it relative. For example, change: "import '/_content/ZXingBlazor/lib/zxing/zxing.min.js';" to "import './_content/ZXingBlazor/lib/zxing/zxing.min.js';"
Affected line:
|
import '/_content/ZXingBlazor/lib/zxing/zxing.min.js'; |
If that's okay with you, I can create a pull request to implement this
In applications that share the same Azure App Service, the camera may not open properly. This is usually because the file import paths for JavaScript files are not resolved correctly in that environment.
To resolve this, you need to modify the imports in the library's JavaScript file by adding a period (.) at the beginning of the path to make it relative. For example, change: "import '/_content/ZXingBlazor/lib/zxing/zxing.min.js';" to "import './_content/ZXingBlazor/lib/zxing/zxing.min.js';"
Affected line:
ZXingBlazor/src/ZXingBlazor/BarcodeReader.razor.js
Line 1 in ab1cd17
If that's okay with you, I can create a pull request to implement this