idmission-web-sdk 2.3.94 → 2.3.95
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/components/video_signature_capture/VideoSignatureContext.d.ts +5 -1
- package/dist/components/video_signature_capture/VideoSignatureContext.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +14 -79
- package/dist/sdk2.cjs.development.js.map +1 -1
- package/dist/sdk2.cjs.production.js +1 -1
- package/dist/sdk2.cjs.production.js.map +1 -1
- package/dist/sdk2.esm.js +14 -79
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +14 -79
- package/dist/sdk2.umd.development.js.map +1 -1
- package/dist/sdk2.umd.production.js +1 -1
- package/dist/sdk2.umd.production.js.map +1 -1
- package/dist/version.d.ts +1 -1
- package/package.json +3 -3
|
@@ -212,7 +212,7 @@
|
|
|
212
212
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
213
213
|
};
|
|
214
214
|
|
|
215
|
-
var webSdkVersion = '2.3.
|
|
215
|
+
var webSdkVersion = '2.3.95';
|
|
216
216
|
|
|
217
217
|
function getPlatform() {
|
|
218
218
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -26964,9 +26964,9 @@
|
|
|
26964
26964
|
videoBitsPerSecond: 650000,
|
|
26965
26965
|
audioBitsPerSecond: 32000
|
|
26966
26966
|
});
|
|
26967
|
-
signatureRecorder.onstart = function () {
|
|
26967
|
+
signatureRecorder.onstart = function (e) {
|
|
26968
26968
|
set({
|
|
26969
|
-
recordingStartedAt:
|
|
26969
|
+
recordingStartedAt: e.timeStamp
|
|
26970
26970
|
});
|
|
26971
26971
|
};
|
|
26972
26972
|
var hasFirstChunk = false;
|
|
@@ -26985,14 +26985,20 @@
|
|
|
26985
26985
|
}
|
|
26986
26986
|
};
|
|
26987
26987
|
signatureRecorder.start(100);
|
|
26988
|
+
set({
|
|
26989
|
+
recordingStartRequestedAt: performance.now()
|
|
26990
|
+
});
|
|
26988
26991
|
},
|
|
26989
26992
|
stopRecording: function stopRecording(signatureData, imageUrl) {
|
|
26993
|
+
set({
|
|
26994
|
+
recordingStopRequestedAt: performance.now()
|
|
26995
|
+
});
|
|
26990
26996
|
waitForOneMoreChunk().then(function () {
|
|
26991
26997
|
if (!signatureRecorder) return;
|
|
26992
26998
|
signatureRecorder.stop();
|
|
26993
26999
|
signatureRecorder.onstop = function () {
|
|
26994
27000
|
return __awaiter(void 0, void 0, void 0, function () {
|
|
26995
|
-
var recordingStoppedAt, inferredType, blob, _a, onSignatureVideoCaptured, recordingStartedAt, firstChunkReceivedAt, signatureStartedAt, signatureEndedAt, lastChunkReceivedAt, mediaInfo;
|
|
27001
|
+
var recordingStoppedAt, inferredType, blob, _a, onSignatureVideoCaptured, recordingStartRequestedAt, recordingStartedAt, firstChunkReceivedAt, signatureStartedAt, signatureEndedAt, recordingStopRequestedAt, lastChunkReceivedAt, mediaInfo;
|
|
26996
27002
|
var _b;
|
|
26997
27003
|
return __generator(this, function (_c) {
|
|
26998
27004
|
switch (_c.label) {
|
|
@@ -27008,67 +27014,20 @@
|
|
|
27008
27014
|
signatureChunks = [];
|
|
27009
27015
|
signatureRecorder = null;
|
|
27010
27016
|
if (!signatureData) return [2 /*return*/];
|
|
27011
|
-
_a = get(), onSignatureVideoCaptured = _a.onSignatureVideoCaptured, recordingStartedAt = _a.recordingStartedAt, firstChunkReceivedAt = _a.firstChunkReceivedAt, signatureStartedAt = _a.signatureStartedAt, signatureEndedAt = _a.signatureEndedAt, lastChunkReceivedAt = _a.lastChunkReceivedAt;
|
|
27012
|
-
return [4 /*yield*/, (_b = get().mediaInfo) === null || _b === void 0 ? void 0 : _b.analyzeData(blob.size, makeReadChunk(blob))
|
|
27013
|
-
// const endMs = Math.min(
|
|
27014
|
-
// signatureEndedAt ?? Infinity,
|
|
27015
|
-
// lastChunkReceivedAt ?? Infinity,
|
|
27016
|
-
// )
|
|
27017
|
-
// const signatureStartTimestamp =
|
|
27018
|
-
// signatureStartedAt && recordingStartedAt
|
|
27019
|
-
// ? formatTimestamp(
|
|
27020
|
-
// Math.max(
|
|
27021
|
-
// 0,
|
|
27022
|
-
// signatureStartedAt -
|
|
27023
|
-
// recordingStartedAt -
|
|
27024
|
-
// RECORDING_TIMESTAMP_PADDING_MS,
|
|
27025
|
-
// ),
|
|
27026
|
-
// )
|
|
27027
|
-
// : undefined
|
|
27028
|
-
// const signatureEndTimestamp =
|
|
27029
|
-
// endMs !== Infinity && recordingStartedAt
|
|
27030
|
-
// ? formatTimestamp(
|
|
27031
|
-
// Math.min(
|
|
27032
|
-
// endMs - recordingStartedAt + RECORDING_TIMESTAMP_PADDING_MS,
|
|
27033
|
-
// lastChunkReceivedAt ?? Infinity,
|
|
27034
|
-
// ),
|
|
27035
|
-
// )
|
|
27036
|
-
// : undefined
|
|
27037
|
-
];
|
|
27017
|
+
_a = get(), onSignatureVideoCaptured = _a.onSignatureVideoCaptured, recordingStartRequestedAt = _a.recordingStartRequestedAt, recordingStartedAt = _a.recordingStartedAt, firstChunkReceivedAt = _a.firstChunkReceivedAt, signatureStartedAt = _a.signatureStartedAt, signatureEndedAt = _a.signatureEndedAt, recordingStopRequestedAt = _a.recordingStopRequestedAt, lastChunkReceivedAt = _a.lastChunkReceivedAt;
|
|
27018
|
+
return [4 /*yield*/, (_b = get().mediaInfo) === null || _b === void 0 ? void 0 : _b.analyzeData(blob.size, makeReadChunk(blob))];
|
|
27038
27019
|
case 1:
|
|
27039
27020
|
mediaInfo = _c.sent();
|
|
27040
|
-
// const endMs = Math.min(
|
|
27041
|
-
// signatureEndedAt ?? Infinity,
|
|
27042
|
-
// lastChunkReceivedAt ?? Infinity,
|
|
27043
|
-
// )
|
|
27044
|
-
// const signatureStartTimestamp =
|
|
27045
|
-
// signatureStartedAt && recordingStartedAt
|
|
27046
|
-
// ? formatTimestamp(
|
|
27047
|
-
// Math.max(
|
|
27048
|
-
// 0,
|
|
27049
|
-
// signatureStartedAt -
|
|
27050
|
-
// recordingStartedAt -
|
|
27051
|
-
// RECORDING_TIMESTAMP_PADDING_MS,
|
|
27052
|
-
// ),
|
|
27053
|
-
// )
|
|
27054
|
-
// : undefined
|
|
27055
|
-
// const signatureEndTimestamp =
|
|
27056
|
-
// endMs !== Infinity && recordingStartedAt
|
|
27057
|
-
// ? formatTimestamp(
|
|
27058
|
-
// Math.min(
|
|
27059
|
-
// endMs - recordingStartedAt + RECORDING_TIMESTAMP_PADDING_MS,
|
|
27060
|
-
// lastChunkReceivedAt ?? Infinity,
|
|
27061
|
-
// ),
|
|
27062
|
-
// )
|
|
27063
|
-
// : undefined
|
|
27064
27021
|
onSignatureVideoCaptured(blob, signatureData, imageUrl !== null && imageUrl !== void 0 ? imageUrl : null, {
|
|
27065
27022
|
mediaInfo: mediaInfo,
|
|
27066
27023
|
mimeType: inferredType,
|
|
27067
27024
|
timingData: {
|
|
27025
|
+
recordingStartRequestedAt: recordingStartRequestedAt,
|
|
27068
27026
|
recordingStartedAt: recordingStartedAt,
|
|
27069
27027
|
firstChunkReceivedAt: firstChunkReceivedAt,
|
|
27070
27028
|
signatureStartedAt: signatureStartedAt,
|
|
27071
27029
|
signatureEndedAt: signatureEndedAt,
|
|
27030
|
+
recordingStopRequestedAt: recordingStopRequestedAt,
|
|
27072
27031
|
recordingStoppedAt: recordingStoppedAt,
|
|
27073
27032
|
lastChunkReceivedAt: lastChunkReceivedAt
|
|
27074
27033
|
}
|
|
@@ -27247,14 +27206,6 @@
|
|
|
27247
27206
|
muted: true,
|
|
27248
27207
|
style: {
|
|
27249
27208
|
display: 'none'
|
|
27250
|
-
// position: 'absolute',
|
|
27251
|
-
// top: 0,
|
|
27252
|
-
// left: 0,
|
|
27253
|
-
// width: '100%',
|
|
27254
|
-
// height: '100%',
|
|
27255
|
-
// zIndex: 1000,
|
|
27256
|
-
// pointerEvents: 'none',
|
|
27257
|
-
// opacity: 0.5,
|
|
27258
27209
|
}
|
|
27259
27210
|
}), /*#__PURE__*/React.createElement(InvisibleCanvas, {
|
|
27260
27211
|
ref: frameCheckCanvas,
|
|
@@ -27266,22 +27217,6 @@
|
|
|
27266
27217
|
height: (_e = videoRef.current) === null || _e === void 0 ? void 0 : _e.videoHeight
|
|
27267
27218
|
}));
|
|
27268
27219
|
}
|
|
27269
|
-
// function formatTimestamp(durationMs: number): string {
|
|
27270
|
-
// // should be in the format of 00:00:00:00 (hh:mm:ss:cs)
|
|
27271
|
-
// const hours = Math.floor(durationMs / 3600000)
|
|
27272
|
-
// const minutes = Math.floor((durationMs % 3600000) / 60000)
|
|
27273
|
-
// const seconds = Math.floor((durationMs % 60000) / 1000)
|
|
27274
|
-
// const milliseconds = durationMs % 1000
|
|
27275
|
-
// // Convert milliseconds to centiseconds (1/100th of a second)
|
|
27276
|
-
// const centiseconds = Math.floor(milliseconds / 10)
|
|
27277
|
-
// const csString = centiseconds.toString().padStart(2, '0')
|
|
27278
|
-
// return (
|
|
27279
|
-
// `${hours.toString().padStart(2, '0')}:` +
|
|
27280
|
-
// `${minutes.toString().padStart(2, '0')}:` +
|
|
27281
|
-
// `${seconds.toString().padStart(2, '0')}:` +
|
|
27282
|
-
// `${csString}`
|
|
27283
|
-
// )
|
|
27284
|
-
// }
|
|
27285
27220
|
function isVideoBlank(video, canvas) {
|
|
27286
27221
|
if (!video || !canvas) return true;
|
|
27287
27222
|
var ctx2 = canvas.getContext('2d');
|