Skip to content

Actions

You can interact with the component using the following methods

const idliveDocCapture = document.querySelector('idlive-document-capture');

idliveDocCapture.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

idliveDocCapture.addEventListener('initialize', () => {
    idliveDocCapture.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:

  • documentDetector
const detectorLicense = '<license_string>';
idliveDocCapture.addEventListener('initialize', () => {
    idliveDocCapture.setLicense(detectorLicense, 'documentDetector');
});