idmission-web-sdk 2.3.17 → 2.3.19
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_id/IdVideoCaptureWizard.d.ts.map +1 -1
- 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/sdk2.cjs.development.js +12 -31
- 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 +12 -31
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +12 -31
- 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
|
@@ -204,7 +204,7 @@ typeof SuppressedError === "function" ? SuppressedError : function (error, suppr
|
|
|
204
204
|
return e.name = "SuppressedError", e.error = error, e.suppressed = suppressed, e;
|
|
205
205
|
};
|
|
206
206
|
|
|
207
|
-
var webSdkVersion = '2.3.
|
|
207
|
+
var webSdkVersion = '2.3.19';
|
|
208
208
|
|
|
209
209
|
function getPlatform() {
|
|
210
210
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13382,7 +13382,7 @@ var useVideoRecorderStore = create()(devtools(function (set, get) {
|
|
|
13382
13382
|
videoRecordingStopped: true
|
|
13383
13383
|
});
|
|
13384
13384
|
};
|
|
13385
|
-
videoRecorder.start(
|
|
13385
|
+
videoRecorder.start(100);
|
|
13386
13386
|
setTimeout(function () {
|
|
13387
13387
|
var videoRecorder = getVideoRecorder();
|
|
13388
13388
|
if (!videoRecorder || videoRecorder.state === 'inactive') {
|
|
@@ -13420,7 +13420,7 @@ var useVideoRecorderStore = create()(devtools(function (set, get) {
|
|
|
13420
13420
|
audioRecordingStopped: true
|
|
13421
13421
|
});
|
|
13422
13422
|
};
|
|
13423
|
-
audioRecorder.start(
|
|
13423
|
+
audioRecorder.start(100);
|
|
13424
13424
|
},
|
|
13425
13425
|
stopRecordingAudio: function stopRecordingAudio() {
|
|
13426
13426
|
set({
|
|
@@ -13449,6 +13449,10 @@ var useVideoRecorder = function useVideoRecorder(mergeAVStreams) {
|
|
|
13449
13449
|
mergeAVStreams: mergeAVStreams
|
|
13450
13450
|
});
|
|
13451
13451
|
}, [mergeAVStreams]);
|
|
13452
|
+
useEffect(function () {
|
|
13453
|
+
// clear recorded data when the component is mounted
|
|
13454
|
+
useVideoRecorderStore.getState().clearRecordedData();
|
|
13455
|
+
}, []);
|
|
13452
13456
|
var processVideo = useCallback(function () {
|
|
13453
13457
|
var videoBlob = new Blob(videoChunks, {
|
|
13454
13458
|
type: 'video/mp4'
|
|
@@ -13571,7 +13575,7 @@ var useVideoSignatureStore = create()(devtools(function (set, get) {
|
|
|
13571
13575
|
signatureRecorder.ondataavailable = function (event) {
|
|
13572
13576
|
signatureChunks.push(event.data);
|
|
13573
13577
|
};
|
|
13574
|
-
signatureRecorder.start(
|
|
13578
|
+
signatureRecorder.start(100);
|
|
13575
13579
|
},
|
|
13576
13580
|
stopRecording: function stopRecording() {
|
|
13577
13581
|
set({
|
|
@@ -13623,31 +13627,11 @@ function VideoSignatureContextProvider(_a) {
|
|
|
13623
13627
|
outputCanvas: outputCanvas
|
|
13624
13628
|
});
|
|
13625
13629
|
}, []);
|
|
13630
|
+
useEffect(function () {
|
|
13631
|
+
// clear recorded data when the component is mounted
|
|
13632
|
+
useVideoSignatureStore.getState().clearRecordedData();
|
|
13633
|
+
}, []);
|
|
13626
13634
|
var isRecording = useVideoSignatureStore().isRecording;
|
|
13627
|
-
// useEffect(() => {
|
|
13628
|
-
// if (!isRecording || !camera) return
|
|
13629
|
-
// waitForCanvasAvailable(outputCanvas).then(() => {
|
|
13630
|
-
// log('VideoSignatureContext: starting recording...')
|
|
13631
|
-
// clearSignatureChunks()
|
|
13632
|
-
// const { startRecordingVideo, startRecordingAudio } =
|
|
13633
|
-
// useVideoRecorderStore.getState()
|
|
13634
|
-
// startRecordingVideo(camera, audioStream)
|
|
13635
|
-
// if (captureAudio) startRecordingAudio(audioStream)
|
|
13636
|
-
// const stream = outputCanvas.current!.captureStream(24 /* fps */)
|
|
13637
|
-
// const tracks = [stream.getVideoTracks()[0]]
|
|
13638
|
-
// const audioTrack = audioStream?.getAudioTracks()?.[0]
|
|
13639
|
-
// if (audioTrack) tracks.push(audioTrack)
|
|
13640
|
-
// const signatureRecorder = new MediaRecorder(new MediaStream(tracks), {
|
|
13641
|
-
// videoBitsPerSecond: 270000,
|
|
13642
|
-
// audioBitsPerSecond: 32000,
|
|
13643
|
-
// })
|
|
13644
|
-
// setSignatureRecorder(signatureRecorder)
|
|
13645
|
-
// signatureRecorder.ondataavailable = (event) => {
|
|
13646
|
-
// signatureChunks.push(event.data)
|
|
13647
|
-
// }
|
|
13648
|
-
// signatureRecorder.start(1000)
|
|
13649
|
-
// })
|
|
13650
|
-
// }, [audioStream, captureAudio, isRecording, camera])
|
|
13651
13635
|
var animationFrame = useRef(0);
|
|
13652
13636
|
useEffect(function () {
|
|
13653
13637
|
if (!videoRef.current || !outputCanvas.current || !camera || !isRecording || !isRecordingVideo) return;
|
|
@@ -14165,7 +14149,6 @@ var VideoSignatureWizard = function VideoSignatureWizard(_a) {
|
|
|
14165
14149
|
return n + 1;
|
|
14166
14150
|
});
|
|
14167
14151
|
setCaptureState('CHECKING_LIVENESS');
|
|
14168
|
-
useVideoSignatureStore.getState().clearRecordedData();
|
|
14169
14152
|
}, [onRetryClicked]);
|
|
14170
14153
|
var onExitSignatureCapture = useCallback(function () {
|
|
14171
14154
|
setAttempt(function (n) {
|
|
@@ -15267,7 +15250,6 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15267
15250
|
return n + 1;
|
|
15268
15251
|
});
|
|
15269
15252
|
setCaptureState('CAPTURING_ID');
|
|
15270
|
-
useVideoRecorderStore.getState().clearRecordedData();
|
|
15271
15253
|
}, []);
|
|
15272
15254
|
var isCapturingId = !skipIdCapture && ['LOADING', 'CAPTURING_ID'].includes(captureState);
|
|
15273
15255
|
useEffect(function () {
|
|
@@ -15278,7 +15260,6 @@ var VideoIdWizard = function VideoIdWizard(_a) {
|
|
|
15278
15260
|
return n + 1;
|
|
15279
15261
|
});
|
|
15280
15262
|
setCaptureState('CHECKING_LIVENESS');
|
|
15281
|
-
useVideoRecorderStore.getState().clearRecordedData();
|
|
15282
15263
|
}, []);
|
|
15283
15264
|
var handleExitCapture = useCallback(function () {
|
|
15284
15265
|
setAttempt(function (n) {
|