@trtc/calls-uikit-react 4.2.5 → 4.4.0

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.2.5",
3
+ "version": "4.4.0",
4
4
  "main": "./tuicall-uikit-react.umd.js",
5
5
  "module": "./tuicall-uikit-react.es.js",
6
6
  "types": "./types/index.d.ts",
@@ -14,8 +14,8 @@
14
14
  },
15
15
  "dependencies": {
16
16
  "@tencentcloud/tui-core-lite": "1.0.0",
17
- "@trtc/call-engine-lite-js": "~3.4.7",
18
- "@tencentcloud/lite-chat": "^1.5.0",
17
+ "@trtc/call-engine-lite-js": "~3.5.0",
18
+ "@tencentcloud/lite-chat": "^1.6.3",
19
19
  "@trtc/call-engine-lite-wx": "~3.4.7"
20
20
  },
21
21
  "bugs": {
@@ -28,7 +28,7 @@ const TUIStore: ITUIStore = TuiStore.getInstance();
28
28
  const uiDesign = UIDesign.getInstance();
29
29
  uiDesign.setTUIStore(TUIStore);
30
30
  const aiAssistant = AIAssistant.getInstance();
31
- const version = '4.2.5';
31
+ const version = '4.4.0';
32
32
  const frameWork = 'react';
33
33
  export { TUIGlobal, TUIStore, uiDesign };
34
34
 
@@ -125,6 +125,11 @@ export default class TUICallService {
125
125
  this.enableAISubtitle(true);
126
126
  await this._tuiCallEngine.login({ userID, userSig, assetsPath: '' }); // web && mini
127
127
  const uiConfig = TUIStore.getData(StoreName.CALL, NAME.CUSTOM_UI_CONFIG);
128
+ // close auto play dialog
129
+ const trtcCloudInstance = this._tuiCallEngine?.getTRTCCloudInstance?.()
130
+ trtcCloudInstance?.callExperimentalAPI(JSON.stringify(
131
+ { "api": "enableAutoPlayDialog","params": { "enable": 0 } }
132
+ ));
128
133
  this._tuiCallEngine?.reportLog?.({
129
134
  name: 'TUICallkit.init',
130
135
  data: {
@@ -66,6 +66,8 @@ export const en = {
66
66
  "The network is poor during your current call": "The network is poor during your current call",
67
67
  "The other user network is poor during the current call": "The other party's network is poor during the current call",
68
68
  "TUICallKit init is not complete": "TUICallKit init is not complete. You need to use this API after the init API is finished.",
69
+ "auto play failed": "Audio playback was blocked",
70
+ "click to resume": "Resume playback",
69
71
  // combine chat
70
72
  "Video call": "Video call",
71
73
  "Voice call": "Voice call",
@@ -77,6 +77,8 @@ export const ja_JP = {
77
77
  "The network is poor during your current call": "現在の通話で、あなたのネットワークは不良です",
78
78
  "The other user network is poor during the current call": "現在の通話で、相手側のネットワークが不良です",
79
79
  "TUICallKit init is not complete": "TUICallKitの初期化ログインが完了していません。init が完了した後にこのAPIを使用する必要があります。",
80
+ "auto play failed": "オーディオ再生がブロックされました",
81
+ "click to resume": "再生を再開",
80
82
  // 待废弃文案
81
83
  'timeout': '{{ userList }} タイムアウト',
82
84
  'kick out': 'キックアウトされました',
@@ -66,6 +66,8 @@ export const zh = {
66
66
  "The network is poor during your current call": "当前通话你的网络不佳",
67
67
  "The other user network is poor during the current call": "当前通话对方网络不佳",
68
68
  "TUICallKit init is not complete": "TUICallKit 初始化登录未完成,需要在 init 完成后使用此 API",
69
+ "auto play failed": "音频播放被拦截,请点击恢复播放",
70
+ "click to resume": "恢复播放",
69
71
  // combine chat
70
72
  "Video call": "发起视频通话",
71
73
  "Voice call": "发起语音通话",
@@ -143,7 +143,7 @@ export const retryPromise = (promise: Promise<any>, num: number = 6, time: numbe
143
143
  * @returns {Boolean}
144
144
  */
145
145
  export function handleRepeatedCallError(error: any) {
146
- if (error?.message.indexOf('is ongoing, please avoid repeated calls') !== -1) {
146
+ if (error?.message?.indexOf('is ongoing, please avoid repeated calls') !== -1) {
147
147
  return true;
148
148
  }
149
149
  return false;
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.2.5'; // basic-demo 原来上报使用
38
+ const Version = '4.4.0'; // basic-demo 原来上报使用
39
39
 
40
40
  // 输出产物
41
41
  export {