capacitor-luna-id-sdk
v5.2.9
Published
LUNA SDK is a face recognition and analysis system that provides efficient and accurate processing of faces in images and video streams
Downloads
1,432
Maintainers
Readme
capacitor-luna-id-sdk
LUNA SDK is a face recognition and analysis system that provides efficient and accurate processing of faces in images and video streams, and can run on a wide variety of mobile operating systems.
Install
npm install capacitor-luna-id-sdk
npx cap sync
LICENCING & Configuration
- Get
licence.conf
from VisionLabs - Configure Luna Platform 5 and get
LunaAccountID
- Configure
LunaServerURL
iOS
- Add to
./node_modules/capacitor-luna-id-sdk/ios/Frameworks/fsdk.framework/data/license.conf
your ownlicence.conf
file; - Add to
Info.plist
<key>LunaServerURL</key>
<string>https://[path-to-luna-platform-api]/6/</string>
<key>LunaAccountID</key>
<string><your luna account id></string>
Android
Add to your project android/app/src/main/assets/data/license.conf
license file
Add to your root project local.properties
DEFAULT_BASE_URL="https://[path-to-luna-platform-api]/6/"
DEFAULT_LUNA_ACCOUNT_ID="<your luna account id>"
vl.login=YOUR_LOGIN
vl.pass=YOUR_PASSWORD
API
initialize(...)
initialize(options?: LunaOptions | undefined) => any
Initialize plugin with configs
| Param | Type |
| ------------- | --------------------------------------------------- |
| options
| LunaOptions |
Returns: any
Since: 1.0.8
start(...)
start(options?: StartOptions | undefined) => any
Start face recognition
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options
| StartOptions |
Returns: any
Since: 1.0.0
Interfaces
LunaOptions
| Prop | Type |
| -------------------------- | ------------------------------------------------- |
| livenessEnabled
| boolean |
| occludeCheck
| boolean |
| trackFaceIdentity
| boolean |
| eyesCheck
| boolean |
| glassesCheckEnabled
| boolean |
| interactionEnabled
| boolean |
| interactionTimeout
| number |
| plistLicenseFileName
| string |
| lunaConfig
| LunaConfig |
| headers
| Headers |
LunaConfig
| Prop | Type | Description | Since |
| ----------------------------- | ----------------------------------------------------- | ------------ | ----- |
| detectorStep
| number | | |
| skipFrames
| number | | |
| compressionQuality
| number | | |
| minimalTrackLength
| number | | |
| bestShotsCount
| number | Android only | 5.0.0 |
| numberOfBestShots
| number | ios only | 5.0.0 |
| borderDistance
| number | | |
| detectFrameSize
| number | | |
| bestShotInterval
| number | | |
| headPitch
| number | | |
| headYaw
| number | | |
| headRoll
| number | | |
| ags
| number | | |
| eyesCheck
| boolean | | |
| locationEnabled
| boolean | ios only | 5.0.0 |
| interactionEnabled
| boolean | | |
| interactionTimeout
| number | | |
| uploadImagesForLiveness
| boolean | | |
| livenessErrorTimeout
| number | | |
| livenessQuality
| number | | |
| livenessType
| LivenessType | | |
StartOptions
| Prop | Type | Description | Default | Since |
| ---------------------------- | -------------------- | ----------------------------------------------------------------------------------- | -------------------- | ----- |
| disableErrors
| boolean | Define whether to record video or not. | : false | 5.0.1 |
| disableInteractionTips
| boolean | Define whether to disable interaction Tips. | : false | 5.0.1 |
| ignoreVideoWithoutFace
| boolean | Define whether to start record video from camera activated or from face is deteced. | : false | 5.0.1 |
| interactionEnabled
| boolean | Define whether to enable interaction or not. | : true | 5.0.1 |
| interactionTimeoutMs
| number | Define timeout for interaction. | : 30000 | 5.0.1 |
| recordVideo
| boolean | Define whether to record video or not. | : false | 5.0.0 |
BestShot
| Prop | Type | Description | Since |
| ------------------ | ------------------- | ----------------------------------------------------------- | ----- |
| base64String
| string | The base64 encoded string representation of found bestShot. | 1.0.0 |
| videoPath
| string | The URI of video recorded from stream. | 5.0.0 |
Type Aliases
Headers
Record<string, string> & Partial<Record<RestrictedHeaders, never>>
RestrictedHeaders
'Authorization' | 'Luna-Account-Id'
Enums
LivenessType
| Members |
| ------------------ |
| None
|
| ByDescriptor
|
| ByPhoto
|