@yidun/livedetect-sdk-h5 2.3.3 → 2.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,2 @@
1
+ import type { UA } from './types';
2
+ export default function compatible(ua: UA): boolean;
@@ -35,7 +35,7 @@ declare class NELiveDetection extends EventEmitter implements Dispose {
35
35
  start(): Promise<void>;
36
36
  restart(): Promise<void>;
37
37
  dispose(): void;
38
- private canUseSDK;
38
+ private isSupport;
39
39
  private onSuccess;
40
40
  private onFail;
41
41
  private getConfigs;
@@ -30,21 +30,22 @@ export interface Options extends PirvateOptions {
30
30
  token: string;
31
31
  offlineToken: string;
32
32
  };
33
- isSupport?: (ua: UAInfo) => boolean;
33
+ useBuiltinSupport?: boolean;
34
+ isSupport?: (ua: UA) => boolean;
34
35
  onMount?: (instance?: NELiveDetection) => void;
35
36
  onReady?: (instance?: NELiveDetection) => void;
36
37
  }
37
38
  export declare type WarnType = 'fail' | 'tip';
38
39
  export declare type FailCode = 'unsupported' | 'notallowed' | 'notfound' | 'notreadable' | 'overconstrained' | 'abort' | 'reject' | 'timeout' | 'action_timeout' | 'auth' | 'pdFail';
39
- export interface BrowserInfo {
40
+ export interface Browser {
40
41
  name: string;
41
42
  version: string;
42
43
  }
43
- export interface OSInfo {
44
+ export interface OS {
44
45
  name: string;
45
46
  version: string;
46
47
  }
47
- export interface UAInfo {
48
- os: OSInfo;
49
- browser: BrowserInfo;
48
+ export interface UA {
49
+ os: OS;
50
+ browser: Browser;
50
51
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@yidun/livedetect-sdk-h5",
3
- "version": "2.3.3",
3
+ "version": "2.4.0",
4
4
  "description": "活体检测 H5",
5
5
  "riskVersion": "2.1.2",
6
6
  "main": "dist/NELiveDetection.umd.js",