Installation
Choose your platform for the installation instructions and camera permissions.
Install @shenai/sdk from npm.
You can also start with a working example for your platform .
Permissions
Configure camera access in the app or browser that captures the frames. If the user denies access, explain where to enable the camera and let them retry the scan.
Serve the page over HTTPS, or use localhost during development. The browser asks for camera access when the SDK first opens the camera. To delay the prompt, initialize with the camera off and enable it when the user starts a scan.
If the browser reports that camera access was already denied, CreateShenaiSDK() can reject before initialization. Ask the user to allow the camera in the site’s permissions, check the browser’s camera access in OS settings if needed, then retry.
If the scan runs in a cross-origin iframe, allow camera access from the parent page.
Continue to SDK initialization.