Capture sessions
FaceCaptureSession
sdk.createFaceSession(video: HTMLVideoElement, opts?: FaceCaptureConfig)FaceCaptureConfig
| Field | Type | Default |
|---|---|---|
cameraDeviceId | string | '' |
activeChallenges | ChallengeType[] | [] |
captureTimeoutMs | number | 30000 |
guidanceFrameRate | number | 30 |
autoCapture | boolean | true |
imageMime | 'image/jpeg' | 'image/png' | 'image/jpeg' |
holdSteadyMs | number | 3000 |
faceQuality | FaceQualityConfig | {} |
faceQualityGate | 'off' | 'guidance' | 'strict' | 'strict' |
maxFaceQualityRetries | number | 5 |
A non-empty activeChallenges array throws CaptureError with code NOT_IMPLEMENTED_V0.
Methods
start()— open the camera and begin the guidance loop.stop()— tear down the session.captureFrame()— manual capture whenautoCapture: false.
Events
See Capture session lifecycle for the full event table.