ngx-scanner icon indicating copy to clipboard operation
ngx-scanner copied to clipboard

Small QR Codes do not work

Open maerni opened this issue 1 year ago • 4 comments

We wanted to use the ngx-scanner and installed the following versions (we use Angular 13):

@zxing/browser 0.1.1 @zxing/library 0.19.2 @zxing/ngx-scanner 3.5.0

Now we have the problem, that it does not work with small QR Codes (i.e. 3x3mm).

With normal or big QR Codes it works.

What could be the problem? How can we fix this?

Thanks.

maerni avatar May 22 '23 08:05 maerni

i have same problem.if we could set zoom for camera it would be better.

daniyal76 avatar Jul 06 '23 08:07 daniyal76

yes, this would be very good, if the autofocus/zoom wourd work fine. without it is not usable for me ;-(

maerni avatar Jul 06 '23 08:07 maerni

Do you happen to have any update on this?? I'm using the latest version 18.0.0 of @zxing/ngx-scanner but still facing this issue.

hardik-hns avatar Jul 09 '24 06:07 hardik-hns

Hi @maerni , The below link would be useful for you as it worked for me - https://github.com/zxing-js/ngx-scanner/issues/535#issue-1890431278

I added the below code in my component and it works -

ZXingScannerComponent.prototype.getAnyVideoDevice = (): Promise<MediaStream> => { return navigator.mediaDevices.getUserMedia({ audio: false, video: { width: { min: 640, ideal: 1920 }, height: { min: 400, ideal: 1080 }, aspectRatio: { ideal: 1.7777777778 } } }); };

hardik-hns avatar Jul 09 '24 11:07 hardik-hns