Actions¶
You can interact with the component using the following methods
const idliveFaceCapture = document.querySelector('idlive-face-capture');
idliveFaceCapture.openCamera();
openCamera¶
Call openCamera
to open the camera and show video
takePhoto¶
Once the camera is opened, you can call takePhoto
to capture a photo
closeCamera¶
You can call closeCamera
to close the camera at any time
setEncryptionKey¶
You can set your public encryption key using setEncryptionKey
method. It accepts a Blob
file with a key as a first argument and an optional second argument with the key ID
idliveFaceCapture.addEventListener('initialize', () => {
idliveFaceCapture.setEncryptionKey(file);
});
setLicense¶
You can set your licenses using setLicense
method. It accepts a string
with a license as a first argument and a string
with a license type as a second
Available license types:
- faceDetector
idliveFaceCapture.addEventListener('initialize', () => {
idliveFaceCapture.setLicense(detectorLicense, 'faceDetector');
});