@tsocial/tvweb-sdk.vib 5.2.0 → 5.4.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -239,11 +239,11 @@
239
239
  resultExtractIdInfoEl.appendChild(document.createTextNode(`Recorded videos: ${recordedVideos.length}\n`));
240
240
 
241
241
  if (qrScannedResult) {
242
- const { result, imageBlob } = qrScannedResult
242
+ const { result, image } = qrScannedResult
243
243
 
244
244
  const qrImgEl = document.createElement("img");
245
245
  qrImgEl.width = "200";
246
- qrImgEl.src = URL.createObjectURL(imageBlob);
246
+ qrImgEl.src = URL.createObjectURL(image.blob);
247
247
  resultExtractIdInfoEl.appendChild(qrImgEl);
248
248
  resultExtractIdInfoEl.appendChild(document.createTextNode(`\n${result}\n`));
249
249
  }
@@ -265,10 +265,10 @@
265
265
  }
266
266
 
267
267
  async function handleDetectIdCard (props) {
268
- const { cardType, imageBlob, cardSide } = props
268
+ const { cardType, image, cardSide } = props
269
269
  const apiClient = new trustvisionSdk.default(inputAccessKey.value, inputSecretKey.value, inputApiUrl.value);
270
270
  const resultUpload = await apiClient.uploadImage({
271
- file: imageBlob,
271
+ file: image.blob,
272
272
  label: `id_card.${cardType}.${cardSide}`,
273
273
  });
274
274
  const imageId = resultUpload.data.image_id
@@ -329,7 +329,11 @@
329
329
  apiUrl: inputApiUrl.value,
330
330
  onLivenessDetectionDone: handleLivenessDetectionDone,
331
331
  customStepTimeConstraints: JSON.parse(customStepTimeConstraintsEl.value),
332
- captureFrameData: true,
332
+ captureFrameSettings: {
333
+ enable: true,
334
+ framesIntervalTime: 180,
335
+ framesBatchLength: 0,
336
+ },
333
337
  onError: (e) => {
334
338
  livenessLoadingEl.style.display = "none";
335
339
  startLivenessBtn.disabled = false;
@@ -377,7 +381,7 @@
377
381
  }
378
382
 
379
383
  function handleLivenessDetectionDone(result) {
380
- const { frontalFaces, apiCheckPassed, steps, videoRecord } = result;
384
+ const { frontalFaces, apiCheckPassed, steps } = result;
381
385
  const apiCheck = selectApiCheckEl.value === "true";
382
386
  resultLivenessDetectionEl.innerHTML = "";
383
387
 
@@ -411,13 +415,6 @@
411
415
  resultLivenessDetectionEl.appendChild(
412
416
  document.createTextNode("Video:")
413
417
  );
414
- if (videoRecord.length) {
415
- const videoEl = document.createElement("video");
416
- videoEl.width = "200";
417
- videoEl.controls = "controls";
418
- videoEl.src = URL.createObjectURL(videoRecord[0]);
419
- resultLivenessDetectionEl.appendChild(videoEl);
420
- }
421
418
  } else {
422
419
  livenessLoadingEl.style.display = "none";
423
420
  startLivenessBtn.disabled = false;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tsocial/tvweb-sdk.vib",
3
- "version": "5.2.0",
3
+ "version": "5.4.3",
4
4
  "description": "TV Web SDK - The Standalone VIB SDK",
5
5
  "keywords": [],
6
6
  "author": "Nha Hoang <nha.hoang@trustingsocial.com>, Son T. Ng <son.nguyen.thai@trustingsocial.com>",
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "dependencies": {
26
26
  "@tsocial/trustvision-sdk": "2.10.1",
27
- "@tsocial/tvweb-core": "^5.2.0",
28
- "@tsocial/tvweb-ui": "^5.2.0",
27
+ "@tsocial/tvweb-core": "^5.4.3",
28
+ "@tsocial/tvweb-ui": "^5.4.3",
29
29
  "invariant": "^2.2.4",
30
30
  "react": "^16.14.0",
31
31
  "react-app-polyfill": "^2.0.0",
@@ -33,7 +33,7 @@
33
33
  "styled-components": "^5.2.1"
34
34
  },
35
35
  "devDependencies": {
36
- "@tsocial/tvweb-builder": "^5.2.0"
36
+ "@tsocial/tvweb-builder": "^5.4.0"
37
37
  },
38
- "gitHead": "82d8bb3ef3b72d4bf645d09f37a7cd305ddf0c47"
38
+ "gitHead": "72e8283b7328854be45a6f0e6db41f9f27645814"
39
39
  }
Binary file