Closed ricardoreveles3 closed 2 years ago
The new version use JavaScript isolation in JavaScript modules
Blazor enables JavaScript (JS) isolation in standard JavaScript modules (ECMAScript specification).
JS isolation provides the following benefits:
[Destructive upgrade] The file Pages/_Host.cshtml or wasm project is wwwroot/index.html, no need to add references!!!!
If it is an upgrade from an older version, please remove the reference of zxing.js
!!REMOVE!!
!!REMOVE!!
. enjoy !
Thank you very much, I removed the scripts and no longer the error on load the JS is appear. But the error "Cant enumerate the devices, method not supported" remains
I also encountered the same problem. The solution is to set the project in https otherwise device enumeration will not be possible.
Currently, however, with the latest 0.21 update, if there are multiple acquisition devices connected, the plugin does not work. If there is only one device, it will boot quietly.
run in a phone?
On Mac (Latest update) and Google Chrome Versión 99.0.4844.84 (Build oficial) (x86_64)
Thank you very much, I removed the scripts and no longer the error on load the JS is appear. But the error "Cant enumerate the devices, method not supported" remains
try using https
On Mac (Latest update) and Google Chrome Versión 99.0.4844.84 (Build oficial) (x86_64)
may MacPro with only buildin camara no ploblem. but ver 0.2.1 yes has a bug, i was fixed and publish a new 0.2.2
Create a new projet
dotnet new blazorserver -o demo1
dotnet sln add demo1/demo1.csproj
dotnet add demo1 package ZXingBlazor
In Pages/Index.razor
@using ZXingBlazor.Components
<button class="btn btn-primary"
type="button"
@onclick="(() => ShowScanBarcode = !ShowScanBarcode)">
[Sacn]
</button>
<input type="text" class="form-control" style="min-width: 100px;"
@bind-value="BarCode"
placeholder="BarCode" />
@if (ShowScanBarcode)
{
<BarcodeReader ScanResult="((e) => { BarCode=e; ShowScanBarcode = !ShowScanBarcode; })"
ShowScanBarcode="ShowScanBarcode"
Close="(()=>ShowScanBarcode=!ShowScanBarcode)"
ScanBtnTitle="Scan"
ResetBtnTitle="Reset"
CloseBtnTitle="Close"
SelectDeviceBtnTitle="Select Device" />
}
@code{
///
/// <summary>
/// BarCode
/// </summary>
public string? BarCode { get; set; }
private string message;
private Task OnError(string message)
{
this.message = message;
StateHasChanged();
return Task.CompletedTask;
}
}
3. Run
cd demo1 dotnet run
It has the same result
The demo works fine
![]()
The demo works fine
try run the source code =>Demo.Server
When I run the demo locally works, but when I deployed to internet does not work
Im using docker to deployed to internet
Im using docker to deployed to internet
try https
Security getUserMedia() can only be called from an HTTPS URL or localhost. Otherwise, the promise from the call is rejected. getUserMedia() also doesn't work for cross-origin calls from iframes. For more information, see Deprecating Permissions in Cross-Origin Iframes.
All browsers generate an infobar upon the call to getUserMedia(), which gives users the option to grant or deny access to their cameras or microphones. Here's the permission dialog from Chrome:
Im using docker to deployed to internet
i try link your ip to my https://blazor.app1.es/ it works fine!
Not work with more camera, for example in tablet
it using https or not?
Https, but not even with the one published by you on github it works
Https, but not even with the one published by you on github it works
neither https://zxingblazor.app1.es/ ?
Https, but not even with the one published by you on github it works
Yes
try zxing officials demo
try zxing officials demo
Yes it works
interesting , what brand and model is the tablet?
interesting , what brand and model is the tablet?
i tried with notebook with windows 10 and it doesn't work. Lenovo tab m10 and not working. Xiaomi mi notes 10 and it doesn't work
interesting , what brand and model is the tablet?
however I want to clarify that up to 0.20 it worked normally, but it was not customizable
Im having a problem to scann codes as the library trows an error.