Angular components
biometry-angular-components provides the capture half of an integration: camera
and microphone components that handle permissions, countdowns, recording windows
and the challenge phrase, then hand you ordinary File objects.
It has no HTTP layer. Components capture media and emit files; you send those files with the Web SDK or your own backend. That separation is deliberate — your API token never has to reach the browser.
This is the library the Biometry Console itself uses for its own biometric sign-in, so it stays current with what the API expects.
Installation
npm install biometry-angular-componentsThe components are standalone: import the ones you need directly into a
component’s imports array, with no module to register.
Components
| Selector | Purpose | Emits |
|---|---|---|
bio-face-capture | Still photo of a face | File |
bio-doc-scan | Photo of an identity document | File |
bio-face-recorder | Video with spoken challenge digits, for verification | { file, audio, phrase } |
bio-voice-recorder | Voice enrollment across several takes | { files, phrases } |
Each capture component emits twice: once when the media is captured
(capture / recorded), and again once the person has confirmed it
(confirmCapture / confirmRecording). Use the confirmed event for anything you
upload — the first fires before the user has had a chance to retake.
Recording a verification
bio-face-recorder records video and audio together while the user reads the
challenge digits aloud.
<bio-face-recorder [challengeDigits]="digits" [recordingSeconds]="10" (confirmRecording)="onCaptured($event)"></bio-face-recorder>| Input | Default | Notes |
|---|---|---|
challengeDigits | — | The digits to display, from your challenge endpoint |
recordingSeconds | 7 | Widen it when the challenge is longer than the default |
countdownSeconds | — | Lead-in before recording starts |
rectWidth / rectHeight | 720 / 1280 | Capture dimensions |
Enrolling a voice
bio-voice-recorder collects several takes and emits them together.
<bio-voice-recorder (confirmRecording)="onVoiceCaptured($event)"></bio-voice-recorder>onVoiceCaptured(payload: { files: File[]; phrases: string[] }) { // phrases are positional: phrases[i] was spoken in files[i]}It emits once, after every take is confirmed — a partial set is worse than
none, so there is nothing to submit until the set is complete. takes defaults
to 4, which is what the voice engine builds a print from.
Services
PermissionsService and RecorderService back the components and are exported
for building your own capture UI. Reach for them only if the components do not
fit — they are the parts most likely to change between releases.