2.0.1 • Published 2 months ago

asliri-comprehensive-liveness-jquery v2.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
2 months ago

ASLIRI - COMPREHENSIVE LIVENESS - WEB SDK (jQuery & HTML)

Description

You can verification face and eye with comprehensive liveness by ASLIRI. The SDK support for HTML

Check out the SDK for a simplified integration.

1. Copy wasm folder to project directory

  • wasm folder provided by ASLIRI
  • copy to yourproject/copyhere...

2. Get your token with ASLIRI Team

3. Install Library if you're not using NPM

library will provided by ASLIRI Team as zip file
you can extract and put 'libs' folder in your project

example: C://webserver/yourproject/libs

sample in index.html :

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script src="libs/jquery/dist/jquery.min.js"></script>
        <script type="module" src="libs/asliri-acu-component/face.umd.js"></script>
        <script type="module" src="libs/asliri-acu-component/comprehensive-liveness.umd.js"></script>
        <script type="module" src="libs/asliri-mg-component/index.umd.js"></script>
        <script src="libs/asliri-comprehensive-liveness-jquery/dist/asliri-comprehensive-liveness-sdk.js"></script>
        <style type="text/css">
            body {
                margin: 0;
                padding: 0;
            }
        </style>

        <title>HTML Integration Sample</title>
    </head>

    <body>
        <div id="app">
            <div id="comprehensiveliveness"></div>
        </div>
    </body>

    <script type="text/javascript">
        async function ComprehensiveLivenessInitial() {
            const getAuth = await window.COMPREHENSIVE_SDK.CheckAuthentication(
                "Provided by ASLIRI Team"
            );

            window.COMPREHENSIVE_SDK.ComprehensiveLiveness(
                getAuth,
                (result) => {
                    // your code for handle result
                    // result.message = message response
                    // result.score = score liveness 0 to 1
                    // result.image = image base64
                    console.log({ result });
                },
                (error) => {
                    // your code for handle error
                    console.log({ error });
                }
            );
        }

        // run comprehensive liveness
        ComprehensiveLivenessInitial();
    </script>
</html>

4. Install Library if you're using NPM

npm i asliri-comprehensive-liveness-jquery --save

sample in index.html :

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="UTF-8" />
        <meta name="viewport" content="width=device-width, initial-scale=1" />
        <script src="node_modules/jquery/dist/jquery.min.js"></script>
        <script type="module" src="node_modules/asliri-acu-component/face.umd.js"></script>
        <script type="module" src="node_modules/asliri-acu-component/comprehensive-liveness.umd.js"></script>
        <script type="module" src="node_modules/asliri-mg-component/index.umd.js"></script>
        <script src="node_modules/asliri-comprehensive-liveness-jquery/dist/asliri-comprehensive-liveness-sdk.js"></script>
        <style type="text/css">
            body {
                margin: 0;
                padding: 0;
            }
        </style>

        <title>HTML Integration Sample</title>
    </head>

    <body>
        <div id="app">
            <div id="comprehensiveliveness"></div>
        </div>
    </body>

    <script type="text/javascript">
        async function ComprehensiveLivenessInitial() {
            const getAuth = await window.COMPREHENSIVE_SDK.CheckAuthentication(
                "Provided by ASLIRI Team"
            );

            window.COMPREHENSIVE_SDK.ComprehensiveLiveness(
                getAuth,
                (result) => {
                    // your code for handle result
                    // result.message = message response
                    // result.score = score liveness 0 to 1
                    // result.image = image base64
                    console.log({ result });
                },
                (error) => {
                    // your code for handle error
                    console.log({ error });
                }
            );
        }

        // run comprehensive liveness
        ComprehensiveLivenessInitial();
    </script>
</html>

Thank you.

2.0.1

2 months ago

2.0.0

2 months ago

1.1.1

4 months ago

1.1.0

4 months ago

1.0.0

5 months ago