This project developed by Dinesh Kumar
In the project directory, you can run:
import {LivenessWebSdk} from 'liveness_web_sdk'
Liveness web sdk lets you capture the user's live picture by accessing the mobile/web camera, it uses our internal AI/ML liveness detection tool.
You can easily setup the SDK in your application using either of the following ways.
- Install the Liveness Web SDK as npm package.
$ npm i liveness_web_sdk --save
import React from "react";
import "./styles.css";
import {LivenessWebSdk} from 'liveness_web_sdk'
function onCaptureImage(imgUrl) {
console.log("ImgUrl response:", imgUrl);
}
// function onError(response) {
// console.log("Error", response);
// }
export default function App() {
return (
<div className="App">
<LivenessWebSdk
onCaptureImage={onCaptureImage}
/>
</div>
);
}
Name |
Type | Required | Default | Description |
---|---|---|---|---|
onCaptureImage | function | true | none | A function that returns base64 image url |