idmission-web-sdk 1.0.244 → 1.0.246
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.cjs.development.js +16 -38
- 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 +16 -38
- package/dist/sdk2.esm.js.map +1 -1
- package/dist/sdk2.umd.development.js +16 -38
- 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
|
@@ -51,7 +51,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
51
51
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
52
52
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
53
53
|
|
|
54
|
-
var webSdkVersion = '1.0.
|
|
54
|
+
var webSdkVersion = '1.0.246';
|
|
55
55
|
|
|
56
56
|
function getPlatform() {
|
|
57
57
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13407,24 +13407,21 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13407
13407
|
var signaturePad = React.useRef(null);
|
|
13408
13408
|
var signatureRecorder = React.useRef(null);
|
|
13409
13409
|
var recordedChunks = React.useRef([]);
|
|
13410
|
-
var _m = React.useState(null),
|
|
13411
|
-
signatureVideoUrl = _m[0],
|
|
13412
|
-
setSignatureVideoUrl = _m[1];
|
|
13413
13410
|
var onPredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
|
|
13414
|
-
var
|
|
13415
|
-
isRecording =
|
|
13416
|
-
startRecording =
|
|
13417
|
-
stopRecording =
|
|
13418
|
-
videoUrl =
|
|
13411
|
+
var _m = useVideoRecorder(cameraRef.current),
|
|
13412
|
+
isRecording = _m.isRecording,
|
|
13413
|
+
startRecording = _m.startRecording,
|
|
13414
|
+
stopRecording = _m.stopRecording,
|
|
13415
|
+
videoUrl = _m.videoUrl;
|
|
13416
|
+
var _o = React.useState(null),
|
|
13417
|
+
signatureData = _o[0],
|
|
13418
|
+
setSignatureData = _o[1];
|
|
13419
13419
|
var _p = React.useState(null),
|
|
13420
|
-
|
|
13421
|
-
|
|
13420
|
+
signatureDataUrl = _p[0],
|
|
13421
|
+
setSignatureDataUrl = _p[1];
|
|
13422
13422
|
var _q = React.useState(null),
|
|
13423
|
-
|
|
13424
|
-
|
|
13425
|
-
var _r = React.useState(null),
|
|
13426
|
-
signatureVideoData = _r[0],
|
|
13427
|
-
setSignatureVideoData = _r[1];
|
|
13423
|
+
signatureVideoData = _q[0],
|
|
13424
|
+
setSignatureVideoData = _q[1];
|
|
13428
13425
|
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
13429
13426
|
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
13430
13427
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -13455,8 +13452,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13455
13452
|
type: 'video/mp4'
|
|
13456
13453
|
});
|
|
13457
13454
|
setSignatureVideoData(blob);
|
|
13458
|
-
var url = URL.createObjectURL(blob);
|
|
13459
|
-
setSignatureVideoUrl(url);
|
|
13460
13455
|
};
|
|
13461
13456
|
}
|
|
13462
13457
|
}, 100);
|
|
@@ -13504,9 +13499,9 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13504
13499
|
cancelAnimationFrame(animationFrame.current);
|
|
13505
13500
|
};
|
|
13506
13501
|
}, [cameraRef, isRecording, onFaceNotDetected, videoRef]);
|
|
13507
|
-
var
|
|
13508
|
-
numFramesWithoutFaces =
|
|
13509
|
-
setNumFramesWithoutFaces =
|
|
13502
|
+
var _r = React.useState(0),
|
|
13503
|
+
numFramesWithoutFaces = _r[0],
|
|
13504
|
+
setNumFramesWithoutFaces = _r[1];
|
|
13510
13505
|
React.useEffect(function () {
|
|
13511
13506
|
onPredictionMade(function (faces) {
|
|
13512
13507
|
setNumFramesWithoutFaces(function (n) {
|
|
@@ -13519,23 +13514,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13519
13514
|
onFaceNotDetected === null || onFaceNotDetected === void 0 ? void 0 : onFaceNotDetected();
|
|
13520
13515
|
}
|
|
13521
13516
|
}, [numFramesWithoutFaces, onFaceNotDetected]);
|
|
13522
|
-
if (!isRecording && videoUrl) {
|
|
13523
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, signatureVideoUrl && ( /*#__PURE__*/React__default['default'].createElement("video", {
|
|
13524
|
-
src: signatureVideoUrl,
|
|
13525
|
-
controls: true,
|
|
13526
|
-
width: "100%"
|
|
13527
|
-
})), signatureDataUrl && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
13528
|
-
src: signatureDataUrl,
|
|
13529
|
-
alt: "signature"
|
|
13530
|
-
}), signatureData && ( /*#__PURE__*/React__default['default'].createElement("textarea", {
|
|
13531
|
-
readOnly: true,
|
|
13532
|
-
style: {
|
|
13533
|
-
width: '100%',
|
|
13534
|
-
height: 500
|
|
13535
|
-
},
|
|
13536
|
-
value: JSON.stringify(signatureData, null, 2)
|
|
13537
|
-
})));
|
|
13538
|
-
}
|
|
13539
13517
|
function onAcceptClicked() {
|
|
13540
13518
|
var _a;
|
|
13541
13519
|
if (!signaturePad.current) return;
|