LUNA SDK is a face recognition and analysis system that provides efficient and accurate processing of faces in images and video streams
npm install capacitor-luna-id-sdkLUNA 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.
``bash`
npm install capacitor-luna-id-sdk
npx cap sync
1. Get licence.conf from VisionLabsLunaAccountID
2. Configure Luna Platform 5 and get LunaServerURL
3. Configure
1. Add to ./node_modules/capacitor-luna-id-sdk/ios/Frameworks/fsdk.framework/data/license.conf your own licence.conf file;Info.plist
2. Add to `bash``bash`
Add to your project android/app/src/main/assets/data/license.conf license file
Add to your root project local.properties`bash`
DEFAULT_BASE_URL="https://[path-to-luna-platform-api]/6/"
DEFAULT_LUNA_ACCOUNT_ID="
vl.login=YOUR_LOGIN
vl.pass=YOUR_PASSWORD
* initialize(...)
* start(...)
* Interfaces
* Type Aliases
* Enums
`typescript`
initialize(options?: LunaOptions | undefined) => any
Initialize plugin with configs
| Param | Type |
| ------------- | --------------------------------------------------- |
| options | LunaOptions |
Returns: any
Since: 1.0.8
--------------------
`typescript`
start(options?: StartOptions | undefined) => any
Start face recognition
| Param | Type |
| ------------- | ----------------------------------------------------- |
| options | StartOptions |
Returns: any
Since: 1.0.0
--------------------
#### 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 | | |
| licenseParams | LicenseParams | android only | 5.3.0 |
#### LicenseParams
| Prop | Type |
| --------------- | ------------------- |
| server | string |
| eId | string |
| productId | string |
#### InitializeResponse
| Prop | Type | Description | Since |
| ------------------ | -------------------- | ---------------- | ----- |
| initialized | boolean | is initialized. | 1.0.0 |
| initializing | boolean | is initializing. | 7.0.4 |
#### 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 |
#### Headers
Record<string, string> & Partial<Record<RestrictedHeaders, never>>
#### RestrictedHeaders
'Authorization' | 'Luna-Account-Id'
#### LivenessType
| Members |
| ------------------ |
| None |
| ByDescriptor |
| ByPhoto` |