idmission-web-sdk 2.3.84 → 2.3.86
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.map +1 -1
- package/dist/components/video_signature_capture/VideoSignatureWizard.d.ts.map +1 -1
- package/dist/lib/camera/useVideoRecorder.d.ts.map +1 -1
- package/dist/lib/utils/blobs.d.ts +2 -2
- package/dist/lib/utils/blobs.d.ts.map +1 -1
- package/dist/sdk2.cjs.development.js +20 -16
- 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 +20 -16
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +20 -16
- 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 +1 -1
|
@@ -211,7 +211,7 @@
|
|
|
211
211
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
212
212
|
};
|
|
213
213
|
|
|
214
|
-
var webSdkVersion = '2.3.
|
|
214
|
+
var webSdkVersion = '2.3.86';
|
|
215
215
|
|
|
216
216
|
function getPlatform() {
|
|
217
217
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -23567,10 +23567,13 @@
|
|
|
23567
23567
|
var templateObject_1$c, templateObject_2$b;
|
|
23568
23568
|
|
|
23569
23569
|
function isBlob(blobPart) {
|
|
23570
|
-
return typeof
|
|
23570
|
+
return typeof Blob !== 'undefined' && blobPart instanceof Blob;
|
|
23571
23571
|
}
|
|
23572
23572
|
function inferBlobType(blobPart) {
|
|
23573
|
-
|
|
23573
|
+
var _a;
|
|
23574
|
+
if (!isBlob(blobPart)) return undefined;
|
|
23575
|
+
var t = ((_a = blobPart.type) !== null && _a !== void 0 ? _a : '').trim();
|
|
23576
|
+
return t.length > 0 ? t : undefined;
|
|
23574
23577
|
}
|
|
23575
23578
|
|
|
23576
23579
|
var videoRecorder = null;
|
|
@@ -23706,8 +23709,7 @@
|
|
|
23706
23709
|
useVideoRecorderStore.getState().clearRecordedData();
|
|
23707
23710
|
}, []);
|
|
23708
23711
|
var processVideo = React.useCallback(function () {
|
|
23709
|
-
var
|
|
23710
|
-
var inferredType = (_a = inferBlobType(videoChunks[0])) !== null && _a !== void 0 ? _a : 'video/mp4';
|
|
23712
|
+
var inferredType = inferBlobType(videoChunks[0]) || (videoRecorder === null || videoRecorder === void 0 ? void 0 : videoRecorder.mimeType) || 'video/mp4';
|
|
23711
23713
|
var videoBlob = new Blob(videoChunks, {
|
|
23712
23714
|
type: inferredType
|
|
23713
23715
|
});
|
|
@@ -23719,8 +23721,9 @@
|
|
|
23719
23721
|
setVideoRecorder(null);
|
|
23720
23722
|
}, []);
|
|
23721
23723
|
var processAudio = React.useCallback(function () {
|
|
23724
|
+
var inferredType = inferBlobType(audioChunks[0]) || (audioRecorder === null || audioRecorder === void 0 ? void 0 : audioRecorder.mimeType) || 'audio/mp4';
|
|
23722
23725
|
var audioBlob = new Blob(audioChunks, {
|
|
23723
|
-
type:
|
|
23726
|
+
type: inferredType
|
|
23724
23727
|
});
|
|
23725
23728
|
useVideoRecorderStore.setState({
|
|
23726
23729
|
audioUrl: URL.createObjectURL(audioBlob),
|
|
@@ -23760,6 +23763,7 @@
|
|
|
23760
23763
|
}, [audioRecordingIntentionallyStopped, audioRecordingStopped, audioUrl, isRecordingAudio, isRecordingVideo, videoRecordingIntentionallyStopped, videoRecordingStopped, videoUrl]);
|
|
23761
23764
|
};
|
|
23762
23765
|
|
|
23766
|
+
var RECORDING_TIMESTAMP_PADDING_MS = 500;
|
|
23763
23767
|
var signatureRecorder = null;
|
|
23764
23768
|
var signatureChunks = [];
|
|
23765
23769
|
var videoSignatureInitialState = {
|
|
@@ -23834,23 +23838,22 @@
|
|
|
23834
23838
|
if (!signatureRecorder) return;
|
|
23835
23839
|
signatureRecorder.stop();
|
|
23836
23840
|
signatureRecorder.onstop = function () {
|
|
23837
|
-
var
|
|
23838
|
-
var inferredType = (_a = inferBlobType(signatureChunks[0])) !== null && _a !== void 0 ? _a : 'video/mp4';
|
|
23841
|
+
var inferredType = inferBlobType(signatureChunks[0]) || (signatureRecorder === null || signatureRecorder === void 0 ? void 0 : signatureRecorder.mimeType) || 'video/mp4';
|
|
23839
23842
|
var blob = new Blob(signatureChunks, {
|
|
23840
23843
|
type: inferredType
|
|
23841
23844
|
});
|
|
23842
23845
|
signatureChunks = [];
|
|
23843
23846
|
signatureRecorder = null;
|
|
23844
23847
|
if (!signatureData) return;
|
|
23845
|
-
var
|
|
23846
|
-
onSignatureVideoCaptured =
|
|
23847
|
-
recordingStartedAt =
|
|
23848
|
-
signatureStartedAt =
|
|
23849
|
-
signatureEndedAt =
|
|
23850
|
-
lastChunkReceivedAt =
|
|
23848
|
+
var _a = get(),
|
|
23849
|
+
onSignatureVideoCaptured = _a.onSignatureVideoCaptured,
|
|
23850
|
+
recordingStartedAt = _a.recordingStartedAt,
|
|
23851
|
+
signatureStartedAt = _a.signatureStartedAt,
|
|
23852
|
+
signatureEndedAt = _a.signatureEndedAt,
|
|
23853
|
+
lastChunkReceivedAt = _a.lastChunkReceivedAt;
|
|
23851
23854
|
var endMs = Math.min(signatureEndedAt !== null && signatureEndedAt !== void 0 ? signatureEndedAt : Infinity, lastChunkReceivedAt !== null && lastChunkReceivedAt !== void 0 ? lastChunkReceivedAt : Infinity);
|
|
23852
|
-
var signatureStartTimestamp = signatureStartedAt && recordingStartedAt ? formatTimestamp(Math.max(0, signatureStartedAt - recordingStartedAt -
|
|
23853
|
-
var signatureEndTimestamp = endMs !== Infinity && recordingStartedAt ? formatTimestamp(Math.min(endMs - recordingStartedAt +
|
|
23855
|
+
var signatureStartTimestamp = signatureStartedAt && recordingStartedAt ? formatTimestamp(Math.max(0, signatureStartedAt - recordingStartedAt - RECORDING_TIMESTAMP_PADDING_MS)) : undefined;
|
|
23856
|
+
var signatureEndTimestamp = endMs !== Infinity && recordingStartedAt ? formatTimestamp(Math.min(endMs - recordingStartedAt + RECORDING_TIMESTAMP_PADDING_MS, lastChunkReceivedAt !== null && lastChunkReceivedAt !== void 0 ? lastChunkReceivedAt : Infinity)) : undefined;
|
|
23854
23857
|
onSignatureVideoCaptured(blob, signatureData, imageUrl !== null && imageUrl !== void 0 ? imageUrl : null, signatureStartTimestamp, signatureEndTimestamp);
|
|
23855
23858
|
};
|
|
23856
23859
|
useVideoRecorderStore.getState().stopRecording();
|
|
@@ -24862,6 +24865,7 @@
|
|
|
24862
24865
|
var onClearBtnClicked = React.useCallback(function () {
|
|
24863
24866
|
var _a, _b;
|
|
24864
24867
|
useVideoSignatureStore.setState({
|
|
24868
|
+
signatureStartedAt: undefined,
|
|
24865
24869
|
signaturePadEmpty: true,
|
|
24866
24870
|
signatureValid: false
|
|
24867
24871
|
});
|