idmission-web-sdk 2.3.121 → 2.3.122

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.
package/dist/sdk2.esm.js CHANGED
@@ -205,7 +205,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
205
205
  return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
206
206
  };
207
207
 
208
- var webSdkVersion = '2.3.121';
208
+ var webSdkVersion = '2.3.122';
209
209
 
210
210
  function getPlatform() {
211
211
  // eslint-disable-next-line @typescript-eslint/ban-ts-comment
@@ -14398,6 +14398,7 @@ var videoSignatureInitialState = {
14398
14398
  nullChunksReceived: 0,
14399
14399
  timesSignatureCleared: 0,
14400
14400
  finalChunkReceived: false,
14401
+ requestDataInterval: undefined,
14401
14402
  onSignatureVideoCaptured: function onSignatureVideoCaptured() {
14402
14403
  return null;
14403
14404
  }
@@ -14455,8 +14456,12 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
14455
14456
  });
14456
14457
  }
14457
14458
  };
14458
- signatureRecorder.start(250);
14459
+ signatureRecorder.start();
14460
+ var interval = setInterval(function () {
14461
+ return signatureRecorder === null || signatureRecorder === void 0 ? void 0 : signatureRecorder.requestData();
14462
+ }, 250);
14459
14463
  set({
14464
+ requestDataInterval: interval,
14460
14465
  recordingStartRequestedAt: performance.now()
14461
14466
  });
14462
14467
  },
@@ -14486,8 +14491,8 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
14486
14491
  },
14487
14492
  diagnostics: {
14488
14493
  nullChunksReceived: nullChunksReceived,
14489
- firstNullChunkReceivedAt: firstNullChunkReceivedAt,
14490
- lastNullChunkReceivedAt: lastNullChunkReceivedAt,
14494
+ firstNullChunkReceivedAt: firstNullChunkReceivedAt ? Math.ceil(firstNullChunkReceivedAt) : 0,
14495
+ lastNullChunkReceivedAt: lastNullChunkReceivedAt ? Math.ceil(lastNullChunkReceivedAt) : 0,
14491
14496
  finalChunkReceived: finalChunkReceived,
14492
14497
  finalChunkTimedOut: timedOut,
14493
14498
  finalChunkWaitedMs: Math.ceil(waitedMs),
@@ -14524,6 +14529,7 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
14524
14529
  recordingStopRequestedAt: performance.now(),
14525
14530
  recordingStoppedAt: undefined
14526
14531
  });
14532
+ clearInterval(get().requestDataInterval);
14527
14533
  return [4 /*yield*/, waitForOneMoreChunk()
14528
14534
  // this represents the time that it is safe to release the camera access
14529
14535
  ];
@@ -14568,7 +14574,7 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
14568
14574
  signatureStartedAt: undefined,
14569
14575
  signatureEndedAt: undefined,
14570
14576
  acceptClickedAt: undefined,
14571
- clearClickedAt: undefined,
14577
+ // Note: clearClickedAt is intentionally preserved for telemetry metadata
14572
14578
  supportsRequestVideoFrameCallback: undefined,
14573
14579
  supportsRoundRect: undefined,
14574
14580
  nullChunksReceived: 0,
@@ -14597,8 +14603,10 @@ function waitForOneMoreChunk(delayMs, checkEveryMs, timeoutMs) {
14597
14603
  timeoutMs = 3000;
14598
14604
  }
14599
14605
  return new Promise(function (resolve) {
14606
+ var _a;
14600
14607
  var start = performance.now();
14601
- var initialLastChunkReceivedAt = useVideoSignatureStore.getState().lastChunkReceivedAt;
14608
+ var initialLastChunkReceivedAt = (_a = useVideoSignatureStore.getState().lastChunkReceivedAt) !== null && _a !== void 0 ? _a : start;
14609
+ signatureRecorder === null || signatureRecorder === void 0 ? void 0 : signatureRecorder.requestData();
14602
14610
  function checkForChunk() {
14603
14611
  var lastChunkReceivedAt = useVideoSignatureStore.getState().lastChunkReceivedAt;
14604
14612
  var waitedMs = performance.now() - start;