@visonid/liveness 1.0.6 → 1.0.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@visonid/liveness",
3
- "version": "1.0.6",
3
+ "version": "1.0.8",
4
4
  "description": "Vison Liveness Detection Web SDK",
5
5
  "main": "src/index.js",
6
6
  "module": "src/index.js",
@@ -36,6 +36,8 @@ export declare class VisonLiveness {
36
36
  private lastGuardWarning;
37
37
  private attrGuardCount;
38
38
  private lightingGuardCount;
39
+ private noFaceGuardCount;
40
+ private multiFaceGuardCount;
39
41
  private antiSpoofGuardCount;
40
42
  private depthGuardCount;
41
43
  private poseGuardCount;
@@ -43,7 +45,27 @@ export declare class VisonLiveness {
43
45
  private deepfakeGuardCount;
44
46
  private flickerGuardCount;
45
47
  private frequencyGuardCount;
46
- private readonly GUARD_CONFIRM;
48
+ private attrTypeStableCount;
49
+ private lastAttrTypeKey;
50
+ private lastFaceDetectedAt;
51
+ private guardConfirm;
52
+ private attrConfirm;
53
+ private lightMin;
54
+ private lightMax;
55
+ private attrBrightnessMin;
56
+ private attrBrightnessMax;
57
+ private attrMinFill;
58
+ private attrMaxFill;
59
+ private noFaceGraceMs;
60
+ private warningCooldownMs;
61
+ private uiPreset;
62
+ private state;
63
+ private stateEnteredAt;
64
+ private stuckHelperConfig;
65
+ private stuckHelperTimer;
66
+ private stuckHelperInterval;
67
+ private lastGuardWarningAt;
68
+ private lastDisplayedGuardWarning;
47
69
  private isInPreflight;
48
70
  private silentFrames;
49
71
  private silentCaptureTimer;
@@ -51,6 +73,11 @@ export declare class VisonLiveness {
51
73
  on(event: string, callback: (event: LivenessEvent) => void): void;
52
74
  off(event: string, callback: (event: LivenessEvent) => void): void;
53
75
  private emit;
76
+ private applyPresetConfig;
77
+ private normalizeStuckHelperConfig;
78
+ private setState;
79
+ private scheduleStuckHelper;
80
+ private stopStuckHelper;
54
81
  start(mode?: LivenessMode): Promise<LivenessResult>;
55
82
  /**
56
83
  * Abort the current liveness detection
@@ -121,6 +148,16 @@ export declare class VisonLiveness {
121
148
  * x-axis is flipped to map correctly onto the mirrored pixel frame.
122
149
  */
123
150
  private computeBrightness;
151
+ /**
152
+ * Compute face area ratio against the current oval area.
153
+ * Uses current InstructionUI oval geometry so thresholds remain consistent
154
+ * across device sizes and responsive layouts.
155
+ */
156
+ private computeFaceFillRatio;
157
+ /**
158
+ * Lightweight center check used before running strict attribute detectors.
159
+ */
160
+ private isFaceCentered;
124
161
  /**
125
162
  * Two-stage sequential pre-flight BEFORE alignment:
126
163
  *