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

Feature request: Code type #16

Closed
Sighi-04 opened this issue Sep 7, 2021 · 2 comments · Fixed by #43
Closed

Feature request: Code type #16

Sighi-04 opened this issue Sep 7, 2021 · 2 comments · Fixed by #43

Comments

@Sighi-04
Copy link

Sighi-04 commented Sep 7, 2021

Would it be possible to report the type of code scanned? Like qrcode, code39, code 93 etc..?

@lalmat
Copy link

lalmat commented May 3, 2022

It's possible from zxing lib. The result object contain a format property.

You can patch the line 52 of StreamBarecodeReader.vue :

// this.$emit("decode", result.text);
this.$emit("decode", result);

then the emit returns the full zxing result object, allowing you to get the format property.

I can make a PR to patch this, but I think It can be better to emit another message, like "result" to not break anything. @olefirenko what do you prefer ?

@olefirenko
Copy link
Owner

@lalmat Thanks for the suggestion! The new result event is added for backward compatibility with the previous versions.
@Sighi-04 The code type should be available now.

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

Successfully merging a pull request may close this issue.

3 participants