veryfi-lens-wasm 1.1.3 → 1.1.4

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.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/veryfi-lens.js +5 -13
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "veryfi-lens-wasm",
3
- "version": "1.1.3",
3
+ "version": "1.1.4",
4
4
  "description": "Lens For Web SDK with WASM",
5
5
  "main": "veryfi-lens.js",
6
6
  "repository": {
package/veryfi-lens.js CHANGED
@@ -236,7 +236,6 @@ const VeryfiLens = (function () {
236
236
  const camHeight = 1920;
237
237
  const isDesktop = window.screen.width > window.screen.height;
238
238
  if (navigator) {
239
- console.log("User agent is present");
240
239
  navigator.mediaDevices
241
240
  .getUserMedia({
242
241
  video: {
@@ -262,7 +261,6 @@ const VeryfiLens = (function () {
262
261
  const camHeight = 4096;
263
262
  const isDesktop = window.screen.width > window.screen.height;
264
263
  if (navigator) {
265
- console.log("User agent is present");
266
264
  navigator.mediaDevices
267
265
  .getUserMedia({
268
266
  video: {
@@ -424,7 +422,7 @@ const VeryfiLens = (function () {
424
422
  [x2, y2],
425
423
  [x3, y3],
426
424
  ];
427
- console.log('coordinates',coordinates)
425
+ // console.log('coordinates',coordinates)
428
426
  }
429
427
  function logLongDocument(
430
428
  status,
@@ -498,9 +496,7 @@ const VeryfiLens = (function () {
498
496
  outputHeight: fullSizeImage.height,
499
497
  };
500
498
  }
501
- console.log(wasmOutput);
502
499
  const { data, blurLevel, outputHeight, outputWidth } = wasmOutput;
503
- console.log(outputWidth, outputHeight);
504
500
  const width = outputWidth;
505
501
  const height = outputHeight;
506
502
  const cropImgCanvas = cropImgRef;
@@ -551,9 +547,7 @@ const VeryfiLens = (function () {
551
547
  };
552
548
  }
553
549
 
554
- console.log(wasmOutput);
555
550
  const { data, blurLevel, outputHeight, outputWidth } = wasmOutput;
556
- console.log(outputWidth, outputHeight);
557
551
  const width = outputWidth;
558
552
  const height = outputHeight;
559
553
  const cropImgCanvas = cropImgRef;
@@ -869,11 +863,6 @@ const VeryfiLens = (function () {
869
863
  );
870
864
  await startUploadWasm();
871
865
  },
872
- // finalImage = await cropWasm();
873
- // setImage && setImage(finalImage);
874
- // stopWasm();
875
- // setIsEditing && setIsEditing(true);
876
- // return finalImage;
877
866
 
878
867
  processDocument: async (
879
868
  image,
@@ -949,7 +938,6 @@ const VeryfiLens = (function () {
949
938
  return await createImageBitmap(imageData).then((bitmap) => {
950
939
  const wasmOutput = wasmWrapper.cropDocument(bitmap);
951
940
  const { data, blurLevel, outputHeight, outputWidth } = wasmOutput;
952
-
953
941
  // If a document is detected and cropped
954
942
  if (outputWidth > 0 && outputHeight > 0) {
955
943
  const width = outputWidth;
@@ -1067,6 +1055,10 @@ const VeryfiLens = (function () {
1067
1055
  setIsDocument(false);
1068
1056
  },
1069
1057
  getDeviceData: () => {
1058
+ if (!device_uuid) {
1059
+ userAgent = navigator.userAgent;
1060
+ device_uuid = new DeviceUUID(userAgent).get();
1061
+ }
1070
1062
  return {
1071
1063
  uuid: device_uuid,
1072
1064
  // fp: device_fingerprint,