To Select the Document Capture Mode for ID images add the document-capture-modes attribute with one of camera, upload, or a comma separated combination like camera,upload.
2. The following image should show up on your web page, if installation, and import, was successful.
Camera Access Permission
3. After granting access by clicking the button, you start by capturing a selfie and liveness images. You should see the capture screen below
Click on Take a Selfie and follow the prompts on the screen to take both the Selfie and Liveness images.
At the end of the selfie capture process, you should see the Selfie review screen.
If the Selfie you took is satisfactory, select "Yes, use this one" or select "Re-take selfie" the selfie again running through steps 3 to 5.
4. If you intend to also capture the ID card image and added the capture-id attribute, additional screens related to ID card capture are displayed in addition to the Selfie related screens
Capture your ID card photo
After taking the ID card photo, you should see the review screen
5. Handle the imagesComputed event in your page / component
On clicking the "Yes, use this one" button for the selfie / liveness images flow, or the "Approve" icon on the capture-id flow, an imagesComputed event will be published.
{
partner_params: {
libraryVersion: String,
permissionGranted: Boolean, // expected to be `true`
},
images: [
{
file: '',
image_type_id: Number, // as recommended here: https://docs.usesmileid.com/products/core-libraries#images-required
image: String // base64 encoded string of image
}
]
}