Clean lifecycle: initialize, attach, start, listen to quality events, receive a typed structured result. Web Worker support keeps the UI responsive. Optional modules do not pollute the core API.
import { CameraVitalCheck } from 'camera-vital-check';
// Create a scanner instance
const scanner = new CameraVitalCheck({
element: document.querySelector('#video'),
lang: 'en',
quality: { minGrade: 'moderate' },
voice: { enabled: true },
onReady: () => console.log('Camera opened'),
onQuality: (q) => updateUI(q),
onProgress: (pct) => setProgress(pct),
});
// Start the scan
await scanner.start();One script tag. No configuration required. Renders a complete scan UI.
Full lifecycle API. Custom UI. Access to quality events and typed result.
Post scan results to your backend endpoint. Useful for server-side logging.
TypeScript-first
Full type definitions included. Result schema is strictly typed.
Framework agnostic
Works with React, Vue, Svelte, or plain HTML.
Web Worker support
rPPG processing in background thread β UI stays responsive.
Typed result schema
status, hr, rr, quality, confidence, reasons, metadata.
Quality events
Real-time quality callbacks throughout the scan lifecycle.
Customisable voice guide
Override any message string. Supports additional languages.
Modular options
Enable only the components you need. Tree-shakeable exports.
Zero external dependencies
No CDN calls during a scan. Fully self-contained.