@yidun/livedetect-sdk-h5
Version:
活体检测 H5
59 lines (58 loc) • 1.57 kB
TypeScript
import NELiveDetection from './live-detection';
import type { Lang } from './utils/i18n';
export interface RequestResponse {
code: number;
msg: string;
result: string;
}
export interface PirvateOptions {
code?: string;
colorMap?: string[];
token?: string;
solutionType?: number;
videoActions?: string[];
}
export interface ThresholdOptions {
minBrightness?: number;
maxBrightness?: number;
minFaceRatio?: number;
maxFaceRatio?: number;
}
export interface Options extends PirvateOptions {
container: HTMLElement | string;
businessKey: string;
mode?: 'mount' | 'popup';
diameter?: number;
audio?: boolean;
fallback?: boolean;
footerTip?: boolean;
lang?: Lang;
apiServer?: string;
preload?: boolean;
thresholdOptions?: ThresholdOptions;
riskConfig?: {
enable: 1 | 2;
pn: string;
apiServer: string;
token: string;
offlineToken: string;
};
useBuiltinSupport?: boolean;
isSupport?: (ua: UA) => boolean;
onMount?: (instance?: NELiveDetection) => void;
onReady?: (instance?: NELiveDetection) => void;
}
export declare type WarnType = 'fail' | 'tip';
export declare type FailCode = 'unsupported' | 'notallowed' | 'notfound' | 'notreadable' | 'overconstrained' | 'abort' | 'reject' | 'timeout' | 'action_timeout' | 'auth' | 'pdFail';
export interface Browser {
name: string;
version: string;
}
export interface OS {
name: string;
version: string;
}
export interface UA {
os: OS;
browser: Browser;
}