realtime-settings
Source: realtime-settings.js:18
The bottom bar over the video stage, plus the persistence behind it.
The match threshold is deliberately NOT adjustable here. 0.60 is the one number on this page with a citable provenance — dlib's default, measured on LFW — and a moved threshold means nothing at all. The information lives in the measured noise floor and in how far the trace climbs above it, not in where an operator decided to drag a line.
The brightness control is display only. face-api reads raw frames from the video element and CSS filters apply at composite, so turning this dial cannot change a descriptor. That is stated in the control's tooltip so nobody later reads an exposure change as a lighting-robustness result.
Instance Methods
values(): Object
Returns the live settings object.
Returns
Object— Current settings.
Static Methods
loadSettings(): Object
Reads persisted view settings.
Returns
Object— Stored or default settings.
saveSettings(settings: object): void
Persists view settings.
Parameters
settings(object) — Settings to store.
Returns
void
loadBaseline(): Object | null
Reads a persisted baseline.
The baseline is a biometric template. It never leaves the device, and "Reset baseline" removes it outright rather than flipping a flag.
Returns
Object | null— Stored baseline.
saveBaseline(baseline: object): void
Persists a baseline.
Parameters
baseline(object) — Baseline record to store.
Returns
void
clearBaseline(): void
Removes the persisted baseline.
Returns
void
guardDestructive(
button: HTMLButtonElement,
idleLabel: string,
confirmLabel: string,
onConfirm: function,
timeoutMs?: number,
): object
Wraps a destructive button in a two-step confirmation.
Deleting a baseline mid-session costs the whole session, and "Delete all" costs every capture on the device. Neither should be one stray click.
Parameters
button(HTMLButtonElement) — Button to guard.idleLabel(string) — Label in the resting state.confirmLabel(string) — Label while awaiting confirmation.onConfirm(function) — Action to run on the second click.timeoutMs(number, optional) — Time before the button reverts.
Returns
object— Guard handle exposingreset().
createSettings(options: object): object
Creates the settings bar controller.
Parameters
options(object) — Wiring options.options.rootEl(HTMLElement) — Element carrying the --rt-* custom properties.options.brightnessEl(HTMLInputElement) — Brightness range input.options.brightnessValueEl(HTMLElement) — Brightness readout.options.equalizerEl(HTMLButtonElement) — Equalizer switch.options.layoutEl(HTMLElement) — Grid root toggled by the equalizer switch.options.onLayoutChange(function) — Called after a layout-affecting change.
Returns
object— Settings controller.