@richard.fadiora/liveness-detection 2.0.2 → 2.1.0

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/README.md CHANGED
@@ -82,8 +82,9 @@ onComplete(true)
82
82
  - The component triggers:
83
83
 
84
84
  ```js
85
- onComplete(false)
85
+ onError(false)
86
86
  ```
87
+ This is because the parameters being passed for both completion and Error are the same: success, result, and skinConfidence.
87
88
 
88
89
  ---
89
90
 
@@ -93,6 +94,7 @@ onComplete(false)
93
94
  |------------|----------------------------|----------|-------------|
94
95
  | `apiUrl` | `string` | Yes | Backend endpoint used for liveness verification |
95
96
  | `onComplete` | `(result: boolean) => void` | Yes | Callback fired after verification completes |
97
+ | `onError` | `(result: boolean) => void` | Yes | Callback fired after verification flags error |
96
98
  | `duration` | `int` | No | Used for setting maximum time for the challenges to be completed |
97
99
 
98
100
  ---
@@ -100,7 +102,7 @@ onComplete(false)
100
102
  ## 🧩 Usage Example
101
103
 
102
104
  ```jsx
103
- import { LivenessSDK } from "./LivenessSDK";
105
+ import { LivenessSDK } from "@richard.fadiora/liveness-detection";
104
106
 
105
107
  function App() {
106
108
  return (
@@ -124,7 +126,7 @@ export default App;
124
126
 
125
127
  ## ⏳ Timeout Rules
126
128
 
127
- - Maximum session duration: **60 seconds**
129
+ - Maximum session duration: Set in the **duration** property, else **60 seconds**
128
130
  - If time expires:
129
131
  - The challenge stops immediately
130
132
  - The verification state resets