h5-scan (reproduced from github)
The mobile terminal calls the camera, scans the QR code (supports react and native js) encapsulates jsQR, and calls the camera to scan to obtain the QR code
Test address: https://zyzcss.github.io/scan/scan.html
Contains 2 versions: react environment, native js environment
Source code download address: https://github.com/zyzcss/h5-scan
Necessary environment: https, pro-test available
compatibility
https://caniuse.com/#search=getUserMedia
Instructions for use
- git clone https://github.com/zyzcss/h5-scan.git
- cd h5-scan
yarn
&yarn start
|npm install
&npm run start
- Make sure that the pc and the mobile phone are in the same LAN, and use ipconfig to view the ip pointed to by ipv4 Example: 192.168.0.1 Enter the react environment in the mobile browser: https://192.168.0.1:3000/Native js environment: https://192.168.0.1: 3000/test.html
JS
Instructions for use
The basic scanning function is realized without too much packaging. Seepublic/test.html