1.1.2 • Published 2 years ago

veryfi-lens-sdk v1.1.2

Weekly downloads
-
License
ISC
Repository
gitlab
Last release
2 years ago
  1. Import package
  2. Add id='veryfi-container' to container you want lens to appear
  3. Add id='blur-detector' to edit screen if you want to use it's logic
  4. Create following function
const startLens = async () => {
      veryfiLens.setUserAgent(navigator.userAgent); //might not be needed if navigator is availible before the sdk
      veryfiLens.setLocation('US') // 'US' or 'Brazil' to choose servers
      veryfiLens.init(sessionToken);
      veryfiLens.startCamera();
      intervalRef = window.setInterval(() => {
        setSocketStatusColor(veryfiLens.getSocketStatusColor()); //if you want to see socket status
      }, INTERVAL);
    };
  1. Call it
  2. Use the following on capture button
const takePhoto = () => {
    veryfiLens.capture(setImage, setIsEditing);
  };  
where setImage is a setter for cropped image that you will use further and setIsEdiditing is a setter for isEditing that would typically be used to change from camera screen to editing(screen with cropped image)
1.1.1

2 years ago

1.1.0

2 years ago

1.0.9

2 years ago

1.0.8

2 years ago

1.0.7

2 years ago

1.0.6

2 years ago

1.0.5

2 years ago

1.1.2

2 years ago

1.0.4

2 years ago

1.0.3

2 years ago