@tsocial/tvweb-sdk.hdbank
v3.9.2
Published
TV Web SDK - The Standalone HDBank SDK
Downloads
16
Readme
@tsocial/tvweb-sdk.hdbank
Examples
Check this.
Install
<script src="https://unpkg.com/@tsocial/tvweb-sdk.hdbank@latest/build/tvweb-sdk.hdbank.standalone.min.js" />
Usage
const tv = new TVWebSDK.SDK({
container: document.getElementById("container"),
lang: "vi",
assetRoot: "https://unpkg.com/@tsocial/tvweb-sdk.hdbank@latest/assets",
});
// Main functions:
tv.readIDCard({
apiCheck: false,
// accessKey: "e576a662-a94a-4012-9d64-c6f6e81fb711",
// secretKey: "6Z6jgTQSqkwRvpN2n4fzm9Wo3vDAFS2q",
// apiUrl: "https://tv-staging.trustingsocial.com/api",
cardSide: TVWebSDK.Constants.IDCardSide.FRONT,
frontCamera: false,
frontCardId: "", // in case read id card back side
title: "Mặt trước CMND/CCCD",
description: "Căn mặt trước CMND/CCCD vào khung",
onSuccess: handleReadIDCardResult,
});
tv.livenessDetection({
mode: TVWebSDK.Constants.Mode.ACTIVE,
apiCheck: false,
// accessKey: "e576a662-a94a-4012-9d64-c6f6e81fb711",
// secretKey: "6Z6jgTQSqkwRvpN2n4fzm9Wo3vDAFS2q",
// apiUrl: "https://tv-staging.trustingsocial.com/api",
onLivenessDetectionDone: handleLivenessDetectionDone,
onError: (e) => alert(e.code),
});
tv.compareFaces({
accessKey: inputAccessKey.value,
secretKey: inputSecretKey.value,
apiUrl: inputApiUrl.value,
image1: '',
image2: '',
onSuccess: (rs) => console.log(rs),
onError: (e) => console.log(e)
})
tv.checkCamera({ frontCamera: true }).then((error) => console.log(error));
More details:
https://docs.google.com/document/d/1v7loVZJ8vVS4cLZYKi-PxhiwH1Ns5Uy4un1GpRfWxro/