Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can't update reader hints instance during scanning #534

Closed
hieunt1407 opened this issue Sep 13, 2022 · 2 comments · Fixed by #629
Closed

Can't update reader hints instance during scanning #534

hieunt1407 opened this issue Sep 13, 2022 · 2 comments · Fixed by #629

Comments

@hieunt1407
Copy link

Hi zxingJS team. I'm very appreciated your work to port it and I'm enjoyed you guys work very handy for my projects. But seem like I faced to this bug or using it wrong.

Describe the bug

  • I tried to update reader hints using code reader instance of hints setter but seem like it's not updated for new hints for reading.

To Reproduce
Steps to reproduce the behavior:

  1. Init reader using const codeReader = new BrowserMultiFormatReader(qrcodeHints, 1000)
  2. Scanning using codeReader.decodeFromStream() with QR code.
  3. Updated hints to ean 1D hints
const hints = new Map()
hints.set(DecodeHintType.POSSIBLE_FORMATS, eanHints)
codeReader.hints = hints

Expected behavior

  • The reader hints should updated correspondingly and it able to read eanHints only

Thanks you in advance!

@hieunt1407 hieunt1407 added the bug label Sep 13, 2022
@hieunt1407
Copy link
Author

hieunt1407 commented Sep 13, 2022

I'm using below work around in order to achieve it

  • Reset the reader using codeReader.reset() and reinit it but's cause flashing on video view feed

Copy link

Stale issue message

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant