mebjas / mebjas.github.io

Repository for hosting my personal home page and blog.
https://blog.minhazav.dev
Apache License 2.0
13 stars 6 forks source link

Both scanapp.org & My Low Level Code fail on First Start - Logitech Webcam C930e (046d:0843) #51

Open dbareis opened 2 months ago

dbareis commented 2 months ago

See the "scanapp.org" example below. The camera is a "Logitech Webcam C930e (046d:0843)".

  1. If I refresh (F5=reload) the page with this camera selected it always fails (the first time).
  2. If I stop then restart it never seems to fail
  3. If I choose a different camera, refresh then choose the correct camera then it also works.

The above make me think this is a timing issue.

Screenshot @ 2_04_2024 , 4_44_54 PM, Chrome Legacy Window_QR Code Scanner - ScanApp - Google Chrome +

The other cameras don't actually work otherwise I'd try them also.... This is on Windows 11 and Chrome with all available updates.

It doesn't seem to occur on Microsoft Edge: Version 123.0.2420.65 (Official build) (64-bit).

Chrome version: Version 123.0.6312.86 (Official Build) (64-bit)

dbareis commented 2 months ago

I have updated my code so that it no longer starts automatically as per every example I have seen, and now have a start & stop button. That doesn't fail on start showing that when the "Html5Qrcode.getCameras()" then code runs the camera is not yet ready to start.

I'm not sure what this means but I tried placing "window.setTimeout(StartScanner, 5000);" in the "then" code and it also failed. For the moment it only works manually.