3.9.2 • Published 3 years ago

@tsocial/tvweb-sdk.hdbank v3.9.2

Weekly downloads
97
License
ISC
Repository
-
Last release
3 years ago

@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/

3.9.2

3 years ago

3.9.1

3 years ago

3.9.0

3 years ago

3.8.6

3 years ago

3.8.5

3 years ago

3.8.3

3 years ago

3.8.0

3 years ago

3.7.0

3 years ago

3.6.1

3 years ago

3.6.0

3 years ago

3.5.3

3 years ago

3.5.2

3 years ago

3.5.1

3 years ago

3.5.0

3 years ago

3.4.0

3 years ago

3.3.0

3 years ago

3.2.24

3 years ago

3.2.23

3 years ago