A sample that allows the user to configure the id capture mode.
Before proceeding, you will need a valid Scandit DataCapture SDK license key. You can retrieve it by signing into your account at https://ssl.scandit.com.
Install dependencies:
npm installMake sure SCANDIT_LICENSE_KEY is available in your environment, by either:
- running
SCANDIT_LICENSE_KEY=<YOUR_LICENSE_KEY> npm run build - placing your license key in a
.envfile at the root of the sample directory - or by inserting your license key into
src/data-capture/DataCapture.svelte, replacing the placeholder-- ENTER YOUR SCANDIT LICENSE KEY HERE --with the key.
Build and serve the application:
npm run build
npm run serveOpen http://localhost:8888 and start scanning.
You can use an SSH tunnel to access the running sample from another device via the internet. To do so, you can install ngrok and create a tunnel to the running sample:
# execute this after npm run serve
ngrok http 8888Make sure you use the HTTPS tunnel because most of the browsers will deny permission to access the camera in non-secure contexts.
Make sure SCANDIT_LICENSE_KEY is available in your environment, by either:
- running
SCANDIT_LICENSE_KEY=<YOUR_LICENSE_KEY> npm run dev - placing your license key in a .env file at the root of the sample directory
- or by inserting your license key into
src/data-capture/DataCapture.svelte, replacing the placeholder-- ENTER YOUR SCANDIT LICENSE KEY HERE --with the key.
Start the development server:
npm run devOpen http://localhost:8888 and start scanning.