Skip to content

Commit 1088ef1

Browse files
added 11.6.4
1 parent 986a32b commit 1088ef1

12 files changed

+123
-154
lines changed

SimpleHTMLApp/README.md

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
# Acuant JavaScript Web SDK v11.6.3
1+
# Acuant JavaScript Web SDK v11.6.4
22

3-
**April 2022**
3+
**May 2022**
44

55
See [https://github.com/Acuant/JavascriptWebSDKV11/releases](https://github.com/Acuant/JavascriptWebSDKV11/releases) for release notes.
66

@@ -98,6 +98,8 @@ The SDK includes the following modules:
9898
- **AcuantMetricsService.js**
9999
- **AcuantMetricsService.wasm**
100100

101+
**Note** To ensure that SDK can instantiate WebAssembly modules efficiently, make sure the hosting server is serving `.wasm` files with the correct mime type `application/wasm`.
102+
101103
1. Load the main script files, excluding ones that will not be used:
102104

103105
<script src="AcuantJavascriptWebSdk.min.js"></script>
@@ -230,7 +232,7 @@ For other browsers that do not support WebRTC, the device's camera app (manual c
230232
**Prerequisite**: Initialize the SDK (see [Initialize and Start the SDK](#initialize-and-start-the-sdk))
231233

232234
- This code is used for live capture; live detection, frame analysis, and auto capture of documents. After capture, it also processes the image.
233-
- AcuantCameraUI is the default implementation of the UI and uses AcuantCamera to access the device’s native camera via WebRTC.
235+
- AcuantCameraUI is the default implementation of the UI and uses AcuantCamera to access the device’s native camera via WebRTC.
234236

235237
### Start Live Capture
236238

@@ -462,11 +464,9 @@ This information is for processing images manually if they are not captured thro
462464

463465
-------------------------------------------------------------
464466

465-
## Face Capture and Acuant Passive Liveness
466-
467-
**Prerequisite:** To use the face capture and FaceID API, credentials with FaceID must be enabled.
467+
## Face Capture with real-time face detection and Acuant Passive Liveness
468468

469-
Acuant recommends using the **LiveAssessment** property rather than the score) to evaluate response. **AcuantPassiveLiveness.start** will return a rescaled image in onCaptured callback. The module supports real-time face detection only Android.
469+
Acuant recommends using the **LiveAssessment** property rather than the score to evaluate response. **AcuantPassiveLiveness.start** will return a rescaled image in onCaptured callback.
470470

471471
Follow these recommendations to effectively process an image for passive liveness:
472472
#### Image requirements
@@ -489,8 +489,6 @@ The following may significantly increase errors or false results:
489489
- A spotlight on the face and nearest surroundings
490490
- An environment with poor lighting or colored light
491491

492-
**Note**: On iOS, real-time face detection is not supported, only manual capture is available. Also, the use of fish-eye lenses is not supported by this API.
493-
494492
### Start face capture and send Passive Liveness request
495493

496494
**Important:** Do not use this module for face capture if you are not using the Acuant FaceID API.
@@ -545,24 +543,23 @@ The following may significantly increase errors or false results:
545543
}
546544
}
547545
```
548-
**Note:** On iOS only onCaptured will be called.
549546

550-
1. Start face capture:
547+
1. Start face capture with real-time detection:
551548

552549
```
553550
AcuantPassiveLiveness.start(faceCaptureCallback, faceDetectionStates);
554551
```
555552

556-
**Note:** On iOS calling ```AcuantPassiveLiveness.start``` will launch the native camera. Alternatively, the module exposes ```startManualCapture``` method that launches the native camera and returns the image taken in base64.
553+
**Note:** The module also exposes ```startManualCapture``` method that launches the native camera and returns the image taken in base64.
557554

558-
1. Upload face image and send request for Passive Liveness result:
555+
1. Get the passive liveness result for the face image:
559556

560557
```
561558
AcuantPassiveLiveness.getLiveness({
562559
endpoint: "ACUANT_PASSIVE_LIVENESS_ENDPOINT",
563560
token: "ACUANT_PASSIVE_LIVENESS_TOKEN",
564561
subscriptionId: "ACUANT_PASSIVE_LIVENESS_SUBSCRIPTIONID",
565-
image: base64img
562+
image: base64Image
566563
}, (result) => {
567564
result = {
568565
LivenessResult = {
@@ -592,6 +589,16 @@ The following may significantly increase errors or false results:
592589
})
593590
```
594591

592+
**Note:** To get the liveness result, credentials with FaceID must be enabled.
593+
594+
1. End Live capture:
595+
596+
The camera closes automatically after the user takes a selfie or when the user taps Close. However, you also can close the live camera by calling the ```end``` function.
597+
598+
```
599+
AcuantPassiveLiveness.end()
600+
```
601+
595602
----------
596603

597604
## Use of CDNs (Content Delivery Networks)
@@ -734,6 +741,9 @@ Starting and stopping Workers is a very slow operation, so you will see performa
734741
735742
Then add the regular HTML content to the page embedded in the iframe.
736743

744+
1. My browser console displays GET tiny_face_detector_model-shard1 404.
745+
746+
Make sure your hosting server is configured to serve extensionless files correctly. By default, IIS, and possibly other servers, are not configured to correctly serve extensionless files.
737747

738748
----------
739749

SimpleHTMLApp/app/index.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -478,6 +478,7 @@ <h3 id="acuant-modal-text"></h3>
478478
faceDetectionTextDiv.style.display = 'flex';
479479
},
480480
onClosed: () => {
481+
faceCaptureContainer.style.display = 'none';
481482
faceDetectionTextDiv.style.display = 'none';
482483
cameraBtn.style.display = 'block';
483484
},

0 commit comments

Comments
 (0)