Skip to content
This repository was archived by the owner on Jun 3, 2025. It is now read-only.

QR Scanner React component#16

Open
Tamas Szabo (sztamas) wants to merge 7 commits into
mainfrom
qr-codes
Open

QR Scanner React component#16
Tamas Szabo (sztamas) wants to merge 7 commits into
mainfrom
qr-codes

Conversation

@sztamas

Copy link
Copy Markdown
Contributor

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.

@ScriptSmith

Copy link
Copy Markdown
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
Copy Markdown
Contributor Author

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
Copy Markdown
Contributor Author

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
Copy Markdown
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
Copy Markdown
Contributor Author

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 subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants