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

Version 2.2.1 and Html5QrcodeScanType undefined #494

Closed
ROBERT-MCDOWELL opened this issue Jun 23, 2022 · 4 comments
Closed

Version 2.2.1 and Html5QrcodeScanType undefined #494

ROBERT-MCDOWELL opened this issue Jun 23, 2022 · 4 comments

Comments

@ROBERT-MCDOWELL
Copy link

Describe the bug
Html5QrcodeScanType is not defined despite of the version 2.2.1 added feature

To Reproduce
following the exemple provided after imported the minified html5-qrcode script

function onScanSuccess(decodedText, decodedResult) {
  // handle the scanned code as you like, for example:
  console.log(`Code matched = ${decodedText}`, decodedResult);
}

let config = {
  fps: 10,
  qrbox: {width: 100, height: 100},
  rememberLastUsedCamera: true,
  // Only support camera scan type.
  supportedScanTypes: [Html5QrcodeScanType.SCAN_TYPE_CAMERA]
};

let html5QrcodeScanner = new Html5QrcodeScanner(
  "reader", config, /* verbose= */ false);
html5QrcodeScanner.render(onScanSuccess);

Expected behavior
array Html5QrcodeScanType must be set and not only declared

@panimaya-gembrill
Copy link

@ROBERT-MCDOWELL Any updates on this issue

@ROBERT-MCDOWELL
Copy link
Author

I think I should modify the code myself and create a PR, but for now I'm very busy....
you can fork the project and do it if you have enough skills

@rlueder
Copy link
Contributor

rlueder commented Aug 9, 2022

@panimaya-gembrill I opened #521 to solve the issue, it was a fairly small fix.

@mebjas
Copy link
Owner

mebjas commented Oct 24, 2022

Fixed in #521, thanks to @rlueder

Will be published in v2.2.4

@mebjas mebjas closed this as completed Oct 24, 2022
@mebjas mebjas mentioned this issue Oct 24, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants