bry-biometric-collector 2.2.23 → 2.2.24

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
@@ -191,6 +191,12 @@ Currently supported tag parameters:
191
191
 
192
192
  Example: `show_justification_field=false`
193
193
 
194
+ - **min_eye_to_eye_dist**: The minimum distance between the eyes that should be accepted on face collector.
195
+
196
+ Default: `0`
197
+
198
+ Example: `min_eye_to_eye_dist=50`
199
+
194
200
  ### **Run-time Configuration**
195
201
 
196
202
  #### **Functions**
@@ -231,6 +237,8 @@ The Web-component exports a series of functions that the host environment may ca
231
237
 
232
238
  - **reset**: Completely resets the web component to its startup state. Unlike clear, this function doesn't depend on finger selected state.
233
239
 
240
+ - **$destroy**: Removes the web component from the DOM and triggers all onDestroy handlers, also stops the camera on face collector.
241
+
234
242
  - **setExportEnableStrategy**: Sets the export buttons enable strategy. The available strategies are subdivied into 3 groups. The CollectedFingersExportEnableStrategy, the BadFingersExportEnableStrategy, and the FaceExportStrategy. The first one defines how the fingers should be captured and how many. The second one fulfills the edge case, when no finger can be captured. The third one affects the behaviour when the face capture is involved. When evaluating wether to turn the export button on or not, first we check the first strategy, and if it doesn't turn on, then evauluate the second strategy, and then the third. The last two strategies will not override the first one to turn the button off, only on. The CollectedFingersExportEnableStrategy accepts the following values:
235
243
 
236
244
  - ALWAYS_ON
@@ -529,6 +537,12 @@ The web component listens to and emits a few events. The events emitted are:
529
537
  * only if liveness_enable=true
530
538
  ```
531
539
 
540
+ - **low-quality-face**: When the photo is captured and the distance between the eyes is below the minimum required (min_eye_to_eye_dist), this event is emitted.
541
+
542
+ ```ts
543
+ {detail: {bodyParts[{bodyPart: 'FACE', minEyeToEyeDist: number, capturedEyeToEyeDist: number}], errorCode: string, translatedError: string}}
544
+ ```
545
+
532
546
  - **export-face**: When the user saves their face (by clicking finish), an event of this kind is emitted with their picture like so:
533
547
 
534
548
  ```ts
@@ -553,7 +567,7 @@ The web component listens to and emits a few events. The events emitted are:
553
567
 
554
568
  - **document-scrapped**: When the user scraps their document photo (by clicking capture again after having saved their picture) this event gets emitted without any data.
555
569
 
556
- - **export-document**: When the user saves their document photo (by clicking finish), an event of this kind is emitted with their picture like so:
570
+ - **export-document**: When the user saves their document photo (by clicking finish), an event of this kind is fired with their picture like so:
557
571
 
558
572
  ```ts
559
573
  {detail: {bodyPart: 'DOCUMENT', data: string, justification: string}}
@@ -567,6 +581,12 @@ And the events the webcomponent listens to are:
567
581
  dispatchEvent(new CustomEvent('change-tabs', { detail: 'Face' }));
568
582
  ```
569
583
 
584
+ - **extension-error**: When extension errors are caught, this event is fired . The data is exported like so:
585
+
586
+ ```ts
587
+ {detail :{code: number, description: string, key: string }};
588
+ ```
589
+
570
590
  ## **Slots**
571
591
 
572
592
  Due to the computational power required to find finger matches in the browser, the main thread gets stuck when a finger is scanned. To circumvent this, the web-component uses a gif with a delay to show the gif before computation begins. As a way for the user to not lose the ability to customize the loading gif, we implemented a slot. This way, the loading gif and its accompanying text can be completely overhauled. To override the loading gif, the passed-in element's `slot` property must be set to `validating-fingerprint-gif`. Below we provide an example of how to do that.
@@ -579,7 +599,11 @@ Due to the computational power required to find finger matches in the browser, t
579
599
  enable_minutiae="true"
580
600
  collector_select="BOTH"
581
601
  >
582
- <img slot="validating-fingerprint-gif" src="https://www.w3schools.com/html/programming.gif" alt="" />
602
+ <img
603
+ slot="validating-fingerprint-gif"
604
+ src="https://www.w3schools.com/html/programming.gif"
605
+ style="height: 100px; width: 100px;"
606
+ alt="" />
583
607
  </biometric-collector>
584
608
  ```
585
609