Skip to Content
ConceptsCapture lifecycle

Capture session lifecycle

Both FaceCaptureSession and FingerprintCaptureSession are EventEmitters with the same overall shape:

idle → initializing → ready → detecting → hold_steady → capturing → (quality_check) → completed ↘ retry → detecting ↘ error

You call start(). The session opens the camera, runs detection, emits a 'guidance' event on every frame, fires 'captured' when a frame passes the gates, then 'completed'. Call stop() to tear down early.

Events

EventFired byPayload
startedbothnone
state_changebothFaceCaptureState | fingerprint state
detectionbothFaceDetectionEvent | HandDetectionEvent
guidancebothGuidanceState
face_qualityfaceFaceQualityResult
qualityfingerprintQualityInfo
quality_failedfingerprintQualityInfo
antispoofface{ score, passed }
capturedbothper-modality result
step_changefingerprint{ index, step }
completedbothfinal result
errorbothSladeIDError subclass
stoppedbothnone

Reading the state

Wire 'guidance' to the UI for prompts (“hold steady”, “move closer”). Wire 'state_change' for higher-level UI changes (showing a countdown, swapping the overlay). Wire 'captured' and 'completed' for the success path; wire 'error' for the failure path.

Used in