veryfi-lens-wasm 2.0.0-beta.4 → 2.0.1
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/components/video.js
CHANGED
|
@@ -20,7 +20,7 @@ export const createVideo = (container) => {
|
|
|
20
20
|
const isMobile = window.innerWidth <= 768 || window.innerHeight <= 768;
|
|
21
21
|
|
|
22
22
|
if (!isMobile) {
|
|
23
|
-
console.log('desktop');
|
|
23
|
+
// console.log('desktop');
|
|
24
24
|
video.style.position = 'absolute';
|
|
25
25
|
video.style.width = '100%';
|
|
26
26
|
video.style.height = 'auto';
|
|
@@ -28,7 +28,7 @@ export const createVideo = (container) => {
|
|
|
28
28
|
video.style.top = '';
|
|
29
29
|
video.style.left = '';
|
|
30
30
|
} else {
|
|
31
|
-
console.log('mobile');
|
|
31
|
+
// console.log('mobile');
|
|
32
32
|
video.style.position = 'fixed';
|
|
33
33
|
video.style.top = '0';
|
|
34
34
|
video.style.left = '0';
|
package/package.json
CHANGED
package/veryfi-lens.js
CHANGED
|
@@ -28,12 +28,7 @@ import { createCardDataButton } from './components/cardDataButton.js';
|
|
|
28
28
|
|
|
29
29
|
|
|
30
30
|
const VeryfiLens = (function () {
|
|
31
|
-
const DEFAULT_BOX_COlOR = "rgba(84, 192, 139, 0.6)";
|
|
32
|
-
const INTERVAL = 250;
|
|
33
|
-
// const VALIDATE_URL = "https://lens.veryfi.com/rest/validate_partner";
|
|
34
|
-
const VALIDATE_URL = "https://lens.veryfi.com/rest/validate_partner";
|
|
35
31
|
let wasmWrapper = null;
|
|
36
|
-
let creditCardStatus = "AutoCaptureResultWaiting";
|
|
37
32
|
|
|
38
33
|
const state = {
|
|
39
34
|
// Camera and processing state
|
|
@@ -721,7 +716,7 @@ const VeryfiLens = (function () {
|
|
|
721
716
|
const ctx = cropImgCanvas.getContext("2d");
|
|
722
717
|
const imageData = new ImageData(data, width, height);
|
|
723
718
|
ctx.putImageData(imageData, 0, 0);
|
|
724
|
-
console.log(blurLevel)
|
|
719
|
+
state.debug_mode && console.log(blurLevel)
|
|
725
720
|
setBlurStatus(blurLevel);
|
|
726
721
|
stopWasm();
|
|
727
722
|
|
|
@@ -933,8 +928,8 @@ const VeryfiLens = (function () {
|
|
|
933
928
|
try {
|
|
934
929
|
state.updateHandler && state.updateHandler({ status: 'validation_started' });
|
|
935
930
|
const response = await fetch(
|
|
936
|
-
|
|
937
|
-
'https://lens-dev.veryfi.com/rest/validate_partner',
|
|
931
|
+
'https://lens.veryfi.com/rest/validate_partner',
|
|
932
|
+
// 'https://lens-dev.veryfi.com/rest/validate_partner',
|
|
938
933
|
// 'http://localhost:5050/rest/validate_partner',
|
|
939
934
|
|
|
940
935
|
{
|
|
@@ -997,7 +992,7 @@ const VeryfiLens = (function () {
|
|
|
997
992
|
};
|
|
998
993
|
|
|
999
994
|
const response = await fetch(
|
|
1000
|
-
"https://lens
|
|
995
|
+
"https://lens.veryfi.com/rest/send-cropped",
|
|
1001
996
|
{
|
|
1002
997
|
method: "POST",
|
|
1003
998
|
headers: {
|
|
@@ -1032,7 +1027,7 @@ const VeryfiLens = (function () {
|
|
|
1032
1027
|
spinner.show();
|
|
1033
1028
|
state.updateHandler && state.updateHandler({ status: 'submission_started' });
|
|
1034
1029
|
|
|
1035
|
-
const processDocumentUrl = "https://lens
|
|
1030
|
+
const processDocumentUrl = "https://lens.veryfi.com/api/document";
|
|
1036
1031
|
const deviceData = await getDeviceData();
|
|
1037
1032
|
|
|
1038
1033
|
const requestBody = {
|
|
@@ -1183,7 +1178,7 @@ const VeryfiLens = (function () {
|
|
|
1183
1178
|
if (state.resultSetter && typeof state.resultSetter === 'function') {
|
|
1184
1179
|
state.resultSetter({ ...state.docReadyResult, image: state.finalImage });
|
|
1185
1180
|
}
|
|
1186
|
-
state.
|
|
1181
|
+
state.submitButton = createSubmitButton(state.videoOverlay.overlay, () => {
|
|
1187
1182
|
handleSubmit(state.finalImage);
|
|
1188
1183
|
}, removeOverlay);
|
|
1189
1184
|
state.enableSubmit && state.submitButton.show();
|