@galacean/effects-plugin-alipay-downgrade 2.0.0-alpha.0 → 2.0.0-alpha.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/dist/alipay-downgrade-plugin.d.ts +0 -1
- package/dist/index.d.ts +0 -27
- package/dist/index.js +266 -234
- package/dist/index.js.map +1 -1
- package/dist/index.min.js +2 -2
- package/dist/index.mjs +267 -232
- package/dist/index.mjs.map +1 -1
- package/dist/utils.d.ts +39 -14
- package/package.json +2 -2
package/dist/utils.d.ts
CHANGED
|
@@ -4,21 +4,46 @@ declare global {
|
|
|
4
4
|
AlipayJSBridge: any;
|
|
5
5
|
}
|
|
6
6
|
}
|
|
7
|
-
export
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
7
|
+
export interface DowngradeOptions {
|
|
8
|
+
/**
|
|
9
|
+
* 发生 gl lost 时,是否忽略
|
|
10
|
+
* @default false - 不忽略,将不再允许任何播放器创建,会全部走降级逻辑
|
|
11
|
+
*/
|
|
12
|
+
ignoreGLLost?: boolean;
|
|
13
|
+
/**
|
|
14
|
+
* 禁用压后台的时候自动暂停播放器
|
|
15
|
+
* @default false - 不自动暂停
|
|
16
|
+
*/
|
|
17
|
+
autoPause?: boolean;
|
|
18
|
+
/**
|
|
19
|
+
* 技术点列表
|
|
20
|
+
*/
|
|
21
|
+
techPoint?: string[];
|
|
22
|
+
/**
|
|
23
|
+
* 降级 API
|
|
24
|
+
* @param bizId - 业务Id
|
|
25
|
+
* @param option - 参数
|
|
26
|
+
* @param callback - 回调函数
|
|
27
|
+
* @returns 降级结果
|
|
28
|
+
*/
|
|
29
|
+
callBridge?: (bizId: string, option: any, callback: (res: any) => void) => void;
|
|
30
|
+
}
|
|
31
|
+
export interface DowngradeResult {
|
|
32
|
+
noAlipayEnv?: boolean;
|
|
33
|
+
bizId?: string;
|
|
34
|
+
systemInfo?: any;
|
|
35
|
+
downgradeResult?: any;
|
|
36
|
+
totalTime?: number;
|
|
37
|
+
mock?: {
|
|
38
|
+
downgrade: boolean;
|
|
39
|
+
deviceLevel?: string;
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
interface DowngradeDecision {
|
|
11
43
|
downgrade: boolean;
|
|
12
44
|
reason: string;
|
|
13
45
|
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
* @param options
|
|
18
|
-
* @returns
|
|
19
|
-
*/
|
|
20
|
-
export declare function checkDowngrade(bizId?: string, options?: {
|
|
21
|
-
techPoint?: string[];
|
|
22
|
-
callBridge?: (a: string, option: any, cb: (res: any) => void) => void;
|
|
23
|
-
}): Promise<DowngradeResult>;
|
|
46
|
+
export declare function getDowngradeResult(bizId: string, options?: DowngradeOptions): Promise<DowngradeResult>;
|
|
47
|
+
export declare function checkDowngradeResult(result: DowngradeResult): DowngradeDecision;
|
|
48
|
+
export declare function getRenderLevelByDevice(renderLevel?: spec.RenderLevel): spec.RenderLevel;
|
|
24
49
|
export {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@galacean/effects-plugin-alipay-downgrade",
|
|
3
|
-
"version": "2.0.0-alpha.
|
|
3
|
+
"version": "2.0.0-alpha.1",
|
|
4
4
|
"description": "Galacean Effects player downgrade plugin for Alipay",
|
|
5
5
|
"module": "./dist/index.mjs",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"registry": "https://registry.npmjs.org"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
"@galacean/effects": "2.0.0-alpha.
|
|
34
|
+
"@galacean/effects": "2.0.0-alpha.1"
|
|
35
35
|
},
|
|
36
36
|
"scripts": {
|
|
37
37
|
"dev": "vite",
|