@yidun/livedetect-sdk-h5 2.3.0 → 2.3.1
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.
- package/README.md +13 -41
- package/dist/NELiveDetection.min.css +1 -1
- package/dist/NELiveDetection.umd.js +2 -2
- package/dist/es/NELiveDetection.css +1 -1
- package/dist/es/NELiveDetection.esm.js +2 -2
- package/dist/es/typings/main/live-detection.d.ts +5 -2
- package/dist/es/typings/main/modules/toast/index.d.ts +1 -1
- package/dist/es/typings/main/types.d.ts +7 -0
- package/package.json +4 -8
|
@@ -7,7 +7,7 @@ import { Tip } from './modules/tip';
|
|
|
7
7
|
import { Camera } from './modules/camera';
|
|
8
8
|
import { Progress } from './modules/progress';
|
|
9
9
|
import { Footer } from './modules/footer';
|
|
10
|
-
import { Record } from './modules/record';
|
|
10
|
+
import { Record as VideoRecord } from './modules/record';
|
|
11
11
|
declare class NELiveDetection extends EventEmitter implements Dispose {
|
|
12
12
|
bdFaceSdk: any;
|
|
13
13
|
options: Required<Options>;
|
|
@@ -22,7 +22,7 @@ declare class NELiveDetection extends EventEmitter implements Dispose {
|
|
|
22
22
|
readonly camera: Camera;
|
|
23
23
|
readonly progress: Progress;
|
|
24
24
|
readonly footer: Footer;
|
|
25
|
-
readonly record
|
|
25
|
+
readonly record: VideoRecord;
|
|
26
26
|
constructor(options: Options);
|
|
27
27
|
mount(container?: Options['container']): void;
|
|
28
28
|
mergeOptionsFromServer(): Promise<void>;
|
|
@@ -30,6 +30,9 @@ declare class NELiveDetection extends EventEmitter implements Dispose {
|
|
|
30
30
|
start(): void;
|
|
31
31
|
restart(): Promise<void>;
|
|
32
32
|
dispose(): void;
|
|
33
|
+
private canUseSDK;
|
|
34
|
+
private onSuccess;
|
|
35
|
+
private onFail;
|
|
33
36
|
private getConfigs;
|
|
34
37
|
private check;
|
|
35
38
|
private videoChange;
|
|
@@ -23,8 +23,15 @@ export interface Options extends PirvateOptions {
|
|
|
23
23
|
lang?: Lang;
|
|
24
24
|
apiServer?: string;
|
|
25
25
|
preload?: boolean;
|
|
26
|
+
isSupport?: (ua: BrandVersion) => boolean;
|
|
26
27
|
onMount?: (instance?: NELiveDetection) => void;
|
|
27
28
|
onReady?: (instance?: NELiveDetection) => void;
|
|
28
29
|
}
|
|
29
30
|
export declare type WarnType = 'fail' | 'tip';
|
|
30
31
|
export declare type FailCode = 'unsupported' | 'notallowed' | 'notfound' | 'notreadable' | 'overconstrained' | 'abort' | 'reject' | 'timeout' | 'action_timeout' | 'auth' | 'pdFail';
|
|
32
|
+
export interface BrandVersion {
|
|
33
|
+
osName: string;
|
|
34
|
+
osVersion: string;
|
|
35
|
+
browserName: string;
|
|
36
|
+
browserVersion: string;
|
|
37
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yidun/livedetect-sdk-h5",
|
|
3
|
-
"version": "2.3.
|
|
3
|
+
"version": "2.3.1",
|
|
4
4
|
"description": "活体检测 H5",
|
|
5
5
|
"main": "dist/NELiveDetection.umd.js",
|
|
6
6
|
"module": "dist/es/NELiveDetection.esm.js",
|
|
@@ -46,18 +46,14 @@
|
|
|
46
46
|
"package.json",
|
|
47
47
|
"README.md"
|
|
48
48
|
],
|
|
49
|
-
"repository": {
|
|
50
|
-
"type": "git",
|
|
51
|
-
"url": "https://g.hz.netease.com/yidunfe/livedetect-sdks/livedetect-sdk-h5.git"
|
|
52
|
-
},
|
|
53
49
|
"keywords": [
|
|
54
50
|
"livedetect",
|
|
55
51
|
"h5",
|
|
56
52
|
"livedetect-sdk-h5"
|
|
57
53
|
],
|
|
58
|
-
"author": "
|
|
59
|
-
"license": "
|
|
60
|
-
"homepage": "https://
|
|
54
|
+
"author": "yidun",
|
|
55
|
+
"license": "UNLICENSED",
|
|
56
|
+
"homepage": "https://dun.163.com",
|
|
61
57
|
"devDependencies": {
|
|
62
58
|
"@babel/core": "^7.17.9",
|
|
63
59
|
"@babel/preset-env": "^7.16.11",
|