@trtc/calls-uikit-react 4.4.7 → 4.4.9
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/package.json +2 -2
- package/src/TUICallService/CallService/index.ts +2 -2
- package/src/TUICallService/TUIGlobal/tuiGlobal.ts +3 -1
- package/src/TUICallService/interface/ITUIGlobal.ts +2 -0
- package/src/TUICallService/utils/env.ts +6 -0
- package/src/index.ts +1 -1
- package/tuicall-uikit-react.es.js +1011 -1007
- package/tuicall-uikit-react.umd.js +3 -3
- package/types/TUICallService/TUIGlobal/tuiGlobal.d.ts +1 -0
- package/types/TUICallService/interface/ITUIGlobal.d.ts +2 -0
- package/types/TUICallService/utils/env.d.ts +2 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trtc/calls-uikit-react",
|
|
3
|
-
"version": "4.4.
|
|
3
|
+
"version": "4.4.9",
|
|
4
4
|
"main": "./tuicall-uikit-react.umd.js",
|
|
5
5
|
"module": "./tuicall-uikit-react.es.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
"directory": "Web"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@tencentcloud/tui-core-lite": "1.0.0",
|
|
16
|
+
"@tencentcloud/tui-core-lite": "~1.0.0",
|
|
17
17
|
"@trtc/call-engine-lite-js": "~3.5.8",
|
|
18
18
|
"@tencentcloud/lite-chat": "^1.6.3",
|
|
19
19
|
"@trtc/call-engine-lite-wx": "~3.4.8"
|
|
@@ -27,7 +27,7 @@ const TUIGlobal: ITUIGlobal = TuiGlobal.getInstance();
|
|
|
27
27
|
const TUIStore: ITUIStore = TuiStore.getInstance();
|
|
28
28
|
const uiDesign = UIDesign.getInstance();
|
|
29
29
|
uiDesign.setTUIStore(TUIStore);
|
|
30
|
-
const version = '4.4.
|
|
30
|
+
const version = '4.4.9';
|
|
31
31
|
import AIAssistant from './AIAssistant'; // 仅 web 支持 AI 实时字幕
|
|
32
32
|
const frameWork = 'react';
|
|
33
33
|
export { TUIGlobal, TUIStore, uiDesign };
|
|
@@ -83,7 +83,7 @@ export default class TUICallService {
|
|
|
83
83
|
await this._wasmReadyPromise;
|
|
84
84
|
|
|
85
85
|
if (!this._isInitialized) {
|
|
86
|
-
this._doInit(params);
|
|
86
|
+
await this._doInit(params);
|
|
87
87
|
this._isInitialized = true;
|
|
88
88
|
}
|
|
89
89
|
}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { APP_NAMESPACE, IS_PC, IS_H5, IN_WX_MINI_APP, IN_UNI_NATIVE_APP, IN_UNI_APP, IS_MAC, IS_WIN } from '../utils/env';
|
|
1
|
+
import { APP_NAMESPACE, IS_PC, IS_H5, IN_WX_MINI_APP, IN_UNI_NATIVE_APP, IN_UNI_APP, IS_MAC, IS_WIN, IS_WX_HARMONY } from '../utils/env';
|
|
2
2
|
import { ITUIGlobal } from '../interface/ITUIGlobal';
|
|
3
3
|
|
|
4
4
|
export default class TUIGlobal implements ITUIGlobal {
|
|
@@ -12,6 +12,7 @@ export default class TUIGlobal implements ITUIGlobal {
|
|
|
12
12
|
public isOfficial: boolean = false;
|
|
13
13
|
public isWIN: boolean = false;
|
|
14
14
|
public isMAC: boolean = false;
|
|
15
|
+
public isWxHarmony: boolean = false;
|
|
15
16
|
constructor() {
|
|
16
17
|
this.initEnv();
|
|
17
18
|
}
|
|
@@ -35,6 +36,7 @@ export default class TUIGlobal implements ITUIGlobal {
|
|
|
35
36
|
this.isUniPlatform = IN_UNI_APP;
|
|
36
37
|
this.isWIN = IS_WIN;
|
|
37
38
|
this.isMAC = IS_MAC;
|
|
39
|
+
this.isWxHarmony = IS_WX_HARMONY;
|
|
38
40
|
}
|
|
39
41
|
|
|
40
42
|
initOfficial(SDKAppID: number) {
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
* @property {Boolean} isOfficial true 标识是腾讯云官网 Demo 应用
|
|
10
10
|
* @property {Boolean} isWIN true 标识是window系统pc
|
|
11
11
|
* @property {Boolean} isMAC true 标识是mac os系统pc
|
|
12
|
+
* @property {Boolean} isWxHarmony true 标识是微信小程序运行在鸿蒙系统
|
|
12
13
|
*/
|
|
13
14
|
export interface ITUIGlobal {
|
|
14
15
|
global: any; // 挂在 wx、uni、window 对象
|
|
@@ -20,6 +21,7 @@ export interface ITUIGlobal {
|
|
|
20
21
|
isOfficial: boolean;
|
|
21
22
|
isWIN: boolean;
|
|
22
23
|
isMAC: boolean;
|
|
24
|
+
isWxHarmony: boolean;
|
|
23
25
|
/**
|
|
24
26
|
* 初始化 TUIGlobal 环境变量
|
|
25
27
|
* @function
|
|
@@ -49,3 +49,9 @@ export const IS_H5 = IS_ANDROID || IS_WIN_PHONE || IS_SYMBIAN || IS_IOS;
|
|
|
49
49
|
export const IS_PC = IN_BROWSER && !IS_H5;
|
|
50
50
|
export const IS_WIN = IS_PC && USER_AGENT.includes('Windows NT');
|
|
51
51
|
export const IS_MAC = IS_PC && USER_AGENT.includes('Mac');
|
|
52
|
+
|
|
53
|
+
let IS_WX_HARMONY = false;
|
|
54
|
+
if (IN_WX_MINI_APP) {
|
|
55
|
+
IS_WX_HARMONY = (wx.getSystemInfoSync()?.system || '').includes('Harmony');
|
|
56
|
+
}
|
|
57
|
+
export { IS_WX_HARMONY };
|