veryfi-lens-wasm 2.0.0 → 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
|
|
|
@@ -884,7 +879,7 @@ const VeryfiLens = (function () {
|
|
|
884
879
|
}
|
|
885
880
|
!state.cardOverlay && (state.cardOverlay = createCreditCardComponent(state.container));
|
|
886
881
|
if (state.exitButton) {
|
|
887
|
-
createExitButton(state.
|
|
882
|
+
createExitButton(state.cardOverlay.element, {
|
|
888
883
|
setter: state.onClose,
|
|
889
884
|
redirectUrl: state.onCloseRedirectUrl,
|
|
890
885
|
}, removeOverlay);
|
|
@@ -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();
|