Closed horrorhound closed 10 months ago
Which version is it? Can you go back to the first two versions and give it a try?
Originally noticed in v1.0.3 and also still present in 1.0.6. Below You see I've tested earlier versions also.
Sample code for these test... New BlazorServer app and then updated the Index.razor page with the following code:
@page "/"
@using ZXingBlazor
<PageTitle>Index</PageTitle>
<h1>Hello, world!</h1>
Welcome to your new app.
<SurveyPrompt Title="How is Blazor working for you?" />
<ZXingBlazor.Components.BarcodeReader ScanResult="ScanResult"></ZXingBlazor.Components.BarcodeReader>
@code{
/// <summary>
/// BarCode
/// </summary>
public string? BarCode { get; set; }
private void ScanResult(string e)
{
BarCode = e;
}
}
With Version 0.27 (Note the additional "Trying to play video that is already playing." lines on each start of the camera after each scan)
ZXing code reader initialized
videoInputDevices:2
Started decodeOnce decode from camera with id c0c704f8c376d13341c888e5164b57011289ba196a0f59b7814c044139b26a84
Started decodeOnce decode from camera with id c0c704f8c376d13341c888e5164b57011289ba196a0f59b7814c044139b26a84
Trying to play video that is already playing.
Trying to play video that is already playing.
Started decodeOnce decode from camera with id c0c704f8c376d13341c888e5164b57011289ba196a0f59b7814c044139b26a84
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
F {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
autostop
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
The thread 0x10da4 has exited with code 0 (0x0).
The thread 0x10e28 has exited with code 0 (0x0).
The thread 0x10dcc has exited with code 0 (0x0).
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
The thread 0x10d38 has exited with code 0 (0x0).
The thread 0x81ec has exited with code 0 (0x0).
F {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
autostop
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
F {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
autostop
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
The thread 0x10e0c has exited with code 0 (0x0).
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
F {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
autostop
Started decodeOnce decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
With Version 2.0
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
i {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
None-stop
Started continous decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
The thread 0x1e78 has exited with code 0 (0x0).
The thread 0xd09c has exited with code 0 (0x0).
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
i {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
None-stop
Started continous decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
i {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
None-stop
Started continous decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
i {text: '00020051135962EO935R', rawBytes: Uint8Array(19), numBits: 152, resultPoints: Array(3), format: 11, …}
None-stop
The thread 0xeb2c has exited with code 0 (0x0).
The thread 0xe53c has exited with code 0 (0x0).
Started continous decode from camera with id 305602e1870d552dece46ca009ea13697a6d5b93952c01bed33f321a46b72cfe
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Trying to play video that is already playing.
Anything before v.02 I couldn't get to work and didn't spend anytime trying to fix the code.
Which version are using? we have not ver2.0 totaly. maybe you can follow this link, because all new version is in nuget.org
https://www.nuget.org/packages/ZXingBlazor#versions-body-tab
Sorry, when I wrote v2 I meant 0.2. I couldn't get any of the v0.1 versions to work which doesn't matter. But all versions of v0.2 and above I see the issue with.
ok i see, Trying to play video that is already playing
you want to hide it right?
because in ios , first render we can not list all cameras, so we do something hack and work for that, so zxing.js show this error
Fixed! try ZXingBlazor 1.0.8
This version seems much better thanks. I'm going to continue testing.
One quick question here. Is this library threadsafe using on Blazor server? I read on other library on blazor server if multiple devices read qr code, it is displayed on all other devices.
So far yes, I've been testing with 2 different devices.
I do see slowness in trying to scan the QR Codes at times; if it's this library, the underlying ZXing library or if my QR codes need to be generated "better".
can you please test the last veision?
Yes, I'll be working on my app this weekend and will respond with any issues.
Using ZXingBlazor (All versions I've tried) in a Blazor Server application; after every scan the Visual Studio Output console shows an additional "Trying to play video that is already playing." after every scan. About every 3-4 scans the memory usage increases by around 1mb.
Example of output after about 10 scans.
Simple Code Example.