@trtc/calls-uikit-react 4.4.7 → 4.4.8

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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trtc/calls-uikit-react",
3
- "version": "4.4.7",
3
+ "version": "4.4.8",
4
4
  "main": "./tuicall-uikit-react.umd.js",
5
5
  "module": "./tuicall-uikit-react.es.js",
6
6
  "types": "./types/index.d.ts",
@@ -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.7';
30
+ const version = '4.4.8';
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 };
package/src/index.ts CHANGED
@@ -35,7 +35,7 @@ const TUICallType = {
35
35
  AUDIO_CALL: 1,
36
36
  VIDEO_CALL: 2,
37
37
  };
38
- const Version = '4.4.7'; // basic-demo 原来上报使用
38
+ const Version = '4.4.8'; // basic-demo 原来上报使用
39
39
 
40
40
  // 输出产物
41
41
  export {