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

QR Scanner React component #16

Open
wants to merge 7 commits into
base: main
Choose a base branch
from
Open

QR Scanner React component #16

wants to merge 7 commits into from

Conversation

sztamas
Copy link
Contributor

@sztamas sztamas commented Mar 7, 2022

This is still work in progress (the code could be cleaned up more and/or documented), but I think it is good enough for others to have a look at it and trying it out.

@sztamas sztamas added the WIP label Mar 7, 2022
@ScriptSmith
Copy link
Member

Tried it out on IOS using a https server:

mkcert <local_ip>
./node_modules/.bin/start-storybook -h 0.0.0.0 --ssl-cert <local_ip>.pem --ssl-key <local_ip>-key.pem --https -p 8001

It requests access to the camera, and presents 'Front Camera' and 'Back Camera' options, but only a white canvas. Will try getting Safari's debug console output tomorrow

@sztamas
Copy link
Contributor Author

sztamas commented Mar 8, 2022

Yes, I started up the storybook server with self-signed certificate myself to test it on my phone.
I had more luck, as it does work on my Galaxy S20.

Please note that you can't select the camera ATM, it should choose the back camera by default.
I'm interested in the console output, I might be able to test it on an iPhone as well later on today.

@sztamas
Copy link
Contributor Author

sztamas commented Mar 8, 2022

Update:
I've just pushed a version that has a naive version of camera selection.
Not very robust, but good enough to play around with on different devices.

@ScriptSmith
Copy link
Member

No luck getting dev tools to work, I believe I'm running into this bug: google/ios-webkit-debug-proxy#383

@sztamas
Copy link
Contributor Author

sztamas commented Mar 16, 2022

Upgraded to the latest qr-scanner, that does scan region and qr code highlighting out of the box.
Our code is way simpler now!

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

Successfully merging this pull request may close these issues.

2 participants