idmission-web-sdk 2.3.82 → 2.3.83
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/lib/camera/useVideoRecorder.d.ts.map +1 -1
- package/dist/lib/utils/blobs.d.ts +3 -0
- package/dist/lib/utils/blobs.d.ts.map +1 -0
- package/dist/sdk2.cjs.development.js +20 -9
- 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 -9
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +20 -9
- 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
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.
|
|
208
|
+
var webSdkVersion = '2.3.83';
|
|
209
209
|
|
|
210
210
|
function getPlatform() {
|
|
211
211
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13661,6 +13661,13 @@ var Container$4 = styled.div(templateObject_1$c || (templateObject_1$c = __makeT
|
|
|
13661
13661
|
var AcceptBtn$1 = styled(LoaderButton)(templateObject_2$b || (templateObject_2$b = __makeTemplateObject(["\n margin-left: auto;\n"], ["\n margin-left: auto;\n"])));
|
|
13662
13662
|
var templateObject_1$c, templateObject_2$b;
|
|
13663
13663
|
|
|
13664
|
+
function isBlob(blobPart) {
|
|
13665
|
+
return typeof blobPart === 'object' && 'type' in blobPart;
|
|
13666
|
+
}
|
|
13667
|
+
function inferBlobType(blobPart) {
|
|
13668
|
+
return isBlob(blobPart) ? blobPart.type : undefined;
|
|
13669
|
+
}
|
|
13670
|
+
|
|
13664
13671
|
var videoRecorder = null;
|
|
13665
13672
|
var audioRecorder = null;
|
|
13666
13673
|
var videoChunks = [];
|
|
@@ -13794,8 +13801,10 @@ var useVideoRecorder = function useVideoRecorder(mergeAVStreams) {
|
|
|
13794
13801
|
useVideoRecorderStore.getState().clearRecordedData();
|
|
13795
13802
|
}, []);
|
|
13796
13803
|
var processVideo = useCallback(function () {
|
|
13804
|
+
var _a;
|
|
13805
|
+
var inferredType = (_a = inferBlobType(videoChunks[0])) !== null && _a !== void 0 ? _a : 'video/mp4';
|
|
13797
13806
|
var videoBlob = new Blob(videoChunks, {
|
|
13798
|
-
type:
|
|
13807
|
+
type: inferredType
|
|
13799
13808
|
});
|
|
13800
13809
|
useVideoRecorderStore.setState({
|
|
13801
13810
|
videoUrl: URL.createObjectURL(videoBlob),
|
|
@@ -13920,18 +13929,20 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
|
|
|
13920
13929
|
if (!signatureRecorder) return;
|
|
13921
13930
|
signatureRecorder.stop();
|
|
13922
13931
|
signatureRecorder.onstop = function () {
|
|
13932
|
+
var _a;
|
|
13933
|
+
var inferredType = (_a = inferBlobType(signatureChunks[0])) !== null && _a !== void 0 ? _a : 'video/mp4';
|
|
13923
13934
|
var blob = new Blob(signatureChunks, {
|
|
13924
|
-
type:
|
|
13935
|
+
type: inferredType
|
|
13925
13936
|
});
|
|
13926
13937
|
signatureChunks = [];
|
|
13927
13938
|
signatureRecorder = null;
|
|
13928
13939
|
if (!signatureData) return;
|
|
13929
|
-
var
|
|
13930
|
-
onSignatureVideoCaptured =
|
|
13931
|
-
recordingStartedAt =
|
|
13932
|
-
signatureStartedAt =
|
|
13933
|
-
signatureEndedAt =
|
|
13934
|
-
lastChunkReceivedAt =
|
|
13940
|
+
var _b = get(),
|
|
13941
|
+
onSignatureVideoCaptured = _b.onSignatureVideoCaptured,
|
|
13942
|
+
recordingStartedAt = _b.recordingStartedAt,
|
|
13943
|
+
signatureStartedAt = _b.signatureStartedAt,
|
|
13944
|
+
signatureEndedAt = _b.signatureEndedAt,
|
|
13945
|
+
lastChunkReceivedAt = _b.lastChunkReceivedAt;
|
|
13935
13946
|
var endMs = Math.min(signatureEndedAt !== null && signatureEndedAt !== void 0 ? signatureEndedAt : Infinity, lastChunkReceivedAt !== null && lastChunkReceivedAt !== void 0 ? lastChunkReceivedAt : Infinity);
|
|
13936
13947
|
var signatureStartTimestamp = signatureStartedAt && recordingStartedAt ? formatTimestamp(Math.max(0, signatureStartedAt - recordingStartedAt - 500)) : undefined;
|
|
13937
13948
|
var signatureEndTimestamp = endMs !== Infinity && recordingStartedAt ? formatTimestamp(Math.min(endMs - recordingStartedAt + 500, lastChunkReceivedAt !== null && lastChunkReceivedAt !== void 0 ? lastChunkReceivedAt : Infinity)) : undefined;
|