Skip to Content
ReferenceCapture sessions

Capture sessions

FaceCaptureSession

sdk.createFaceSession(video: HTMLVideoElement, opts?: FaceCaptureConfig)

FaceCaptureConfig

FieldTypeDefault
cameraDeviceIdstring''
activeChallengesChallengeType[][]
captureTimeoutMsnumber30000
guidanceFrameRatenumber30
autoCapturebooleantrue
imageMime'image/jpeg' | 'image/png''image/jpeg'
holdSteadyMsnumber3000
faceQualityFaceQualityConfig{}
faceQualityGate'off' | 'guidance' | 'strict''strict'
maxFaceQualityRetriesnumber5

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 when autoCapture: false.

Events

See Capture session lifecycle for the full event table.