idmission-web-sdk 1.0.243 → 1.0.245
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
|
@@ -50,7 +50,7 @@ var LanguageDetector__default = /*#__PURE__*/_interopDefaultLegacy(LanguageDetec
|
|
|
50
50
|
var i18n__default = /*#__PURE__*/_interopDefaultLegacy(i18n);
|
|
51
51
|
var SignatureCanvas__default = /*#__PURE__*/_interopDefaultLegacy(SignatureCanvas);
|
|
52
52
|
|
|
53
|
-
var webSdkVersion = '1.0.
|
|
53
|
+
var webSdkVersion = '1.0.245';
|
|
54
54
|
|
|
55
55
|
function getPlatform() {
|
|
56
56
|
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
@@ -13302,24 +13302,21 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13302
13302
|
var signaturePad = React.useRef(null);
|
|
13303
13303
|
var signatureRecorder = React.useRef(null);
|
|
13304
13304
|
var recordedChunks = React.useRef([]);
|
|
13305
|
-
var _m = React.useState(null),
|
|
13306
|
-
signatureVideoUrl = _m[0],
|
|
13307
|
-
setSignatureVideoUrl = _m[1];
|
|
13308
13305
|
var onPredictionMade = React.useContext(HighPerformanceSelfieGuidanceModelsContext).onPredictionMade;
|
|
13309
|
-
var
|
|
13310
|
-
isRecording =
|
|
13311
|
-
startRecording =
|
|
13312
|
-
stopRecording =
|
|
13313
|
-
videoUrl =
|
|
13306
|
+
var _m = useVideoRecorder(cameraRef.current),
|
|
13307
|
+
isRecording = _m.isRecording,
|
|
13308
|
+
startRecording = _m.startRecording,
|
|
13309
|
+
stopRecording = _m.stopRecording,
|
|
13310
|
+
videoUrl = _m.videoUrl;
|
|
13311
|
+
var _o = React.useState(null),
|
|
13312
|
+
signatureData = _o[0],
|
|
13313
|
+
setSignatureData = _o[1];
|
|
13314
13314
|
var _p = React.useState(null),
|
|
13315
|
-
|
|
13316
|
-
|
|
13315
|
+
signatureDataUrl = _p[0],
|
|
13316
|
+
setSignatureDataUrl = _p[1];
|
|
13317
13317
|
var _q = React.useState(null),
|
|
13318
|
-
|
|
13319
|
-
|
|
13320
|
-
var _r = React.useState(null),
|
|
13321
|
-
signatureVideoData = _r[0],
|
|
13322
|
-
setSignatureVideoData = _r[1];
|
|
13318
|
+
signatureVideoData = _q[0],
|
|
13319
|
+
setSignatureVideoData = _q[1];
|
|
13323
13320
|
colors.guidanceMessageBackgroundColor || (colors.guidanceMessageBackgroundColor = '#ccc');
|
|
13324
13321
|
colors.guidanceMessageTextColor || (colors.guidanceMessageTextColor = 'black');
|
|
13325
13322
|
var verbiage = useTranslations(rawVerbiage, {
|
|
@@ -13350,8 +13347,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13350
13347
|
type: 'video/mp4'
|
|
13351
13348
|
});
|
|
13352
13349
|
setSignatureVideoData(blob);
|
|
13353
|
-
var url = URL.createObjectURL(blob);
|
|
13354
|
-
setSignatureVideoUrl(url);
|
|
13355
13350
|
};
|
|
13356
13351
|
}
|
|
13357
13352
|
}, 100);
|
|
@@ -13399,9 +13394,9 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13399
13394
|
cancelAnimationFrame(animationFrame.current);
|
|
13400
13395
|
};
|
|
13401
13396
|
}, [cameraRef, isRecording, onFaceNotDetected, videoRef]);
|
|
13402
|
-
var
|
|
13403
|
-
numFramesWithoutFaces =
|
|
13404
|
-
setNumFramesWithoutFaces =
|
|
13397
|
+
var _r = React.useState(0),
|
|
13398
|
+
numFramesWithoutFaces = _r[0],
|
|
13399
|
+
setNumFramesWithoutFaces = _r[1];
|
|
13405
13400
|
React.useEffect(function () {
|
|
13406
13401
|
onPredictionMade(function (faces) {
|
|
13407
13402
|
setNumFramesWithoutFaces(function (n) {
|
|
@@ -13414,23 +13409,6 @@ var VideoSignatureCapture = function VideoSignatureCapture(_a) {
|
|
|
13414
13409
|
onFaceNotDetected === null || onFaceNotDetected === void 0 ? void 0 : onFaceNotDetected();
|
|
13415
13410
|
}
|
|
13416
13411
|
}, [numFramesWithoutFaces, onFaceNotDetected]);
|
|
13417
|
-
if (!isRecording && videoUrl) {
|
|
13418
|
-
return /*#__PURE__*/React__default['default'].createElement(React__default['default'].Fragment, null, signatureVideoUrl && ( /*#__PURE__*/React__default['default'].createElement("video", {
|
|
13419
|
-
src: signatureVideoUrl,
|
|
13420
|
-
controls: true,
|
|
13421
|
-
width: "100%"
|
|
13422
|
-
})), signatureDataUrl && /*#__PURE__*/React__default['default'].createElement("img", {
|
|
13423
|
-
src: signatureDataUrl,
|
|
13424
|
-
alt: "signature"
|
|
13425
|
-
}), signatureData && ( /*#__PURE__*/React__default['default'].createElement("textarea", {
|
|
13426
|
-
readOnly: true,
|
|
13427
|
-
style: {
|
|
13428
|
-
width: '100%',
|
|
13429
|
-
height: 500
|
|
13430
|
-
},
|
|
13431
|
-
value: JSON.stringify(signatureData, null, 2)
|
|
13432
|
-
})));
|
|
13433
|
-
}
|
|
13434
13412
|
function onAcceptClicked() {
|
|
13435
13413
|
var _a;
|
|
13436
13414
|
if (!signaturePad.current) return;
|