@trtc/calls-uikit-react 4.5.2 → 4.5.3-beta.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/package.json +3 -4
- package/src/TUICallService/CallService/index.ts +16 -1
- package/src/TUICallService/TUIStore/callStore.ts +1 -0
- package/src/TUICallService/const/index.ts +1 -0
- package/src/TUICallService/interface/ICallStore.ts +1 -0
- package/src/index.ts +1 -1
- package/tuicall-uikit-react.es.js +1215 -1197
- package/tuicall-uikit-react.umd.js +4 -4
- package/types/Components/TUICallKit/TUICallKit.d.ts +2 -2
- package/types/Components/components/GroupCall/GroupCall.d.ts +2 -1
- package/types/Components/components/GroupCall/MediaContainer/AudioStream/AudioStream.d.ts +2 -1
- package/types/Components/components/GroupCall/MediaContainer/MediaContainer.d.ts +2 -1
- package/types/Components/components/GroupCall/MediaContainer/StreamLoading/StreamLoading.d.ts +1 -1
- package/types/Components/components/GroupCall/Waiting/Waiting.d.ts +2 -1
- package/types/Components/components/SingleCall/MediaContainer/AudioStream/AudioStream.d.ts +2 -1
- package/types/Components/components/SingleCall/MediaContainer/MediaContainer.d.ts +2 -1
- package/types/Components/components/SingleCall/SingleCall.d.ts +1 -1
- package/types/Components/components/SingleCall/Waiting/Waiting.d.ts +2 -1
- package/types/Components/components/base/Avatar/Avatar.d.ts +2 -2
- package/types/Components/components/base/Drag/Drag.d.ts +2 -2
- package/types/Components/components/base/Grid/Col/Col.d.ts +2 -2
- package/types/Components/components/base/Grid/Row/Row.d.ts +1 -1
- package/types/Components/components/base/GridLayout/GridLayout.d.ts +2 -1
- package/types/Components/components/base/GridLayout/GridPlusItem/GridPlusItem.d.ts +2 -2
- package/types/Components/components/base/Icon/Icon.d.ts +2 -2
- package/types/Components/components/base/Loading/Circle/Cilrcle.d.ts +2 -1
- package/types/Components/components/base/Loading/Dot/Dot.d.ts +2 -1
- package/types/Components/components/base/Loading/Loading.d.ts +2 -2
- package/types/Components/components/base/Message/Message.d.ts +2 -2
- package/types/Components/components/base/Message/MessageIcon/Error.d.ts +1 -1
- package/types/Components/components/base/Message/MessageIcon/Info.d.ts +1 -1
- package/types/Components/components/base/Message/MessageIcon/Success.d.ts +1 -1
- package/types/Components/components/base/Message/MessageIcon/Warning.d.ts +1 -1
- package/types/Components/components/base/Overlayer/Overlayer.d.ts +2 -2
- package/types/Components/components/base/Text/Text.d.ts +2 -1
- package/types/Components/components/base/Time/Time.d.ts +2 -1
- package/types/Components/components/base/ToggleWindow/ToggleWindow.d.ts +1 -1
- package/types/Components/components/base/ToggleWindow/ToggleWindowItem/ToggleWindowItem.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/ButtonPanel.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/ButtonPanelH5/ButtonPanelH5.d.ts +2 -2
- package/types/Components/components/common/ButtonPanel/ButtonPanelPC/ButtonPanelPC.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Accept/Accept.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/BackgroundBlur/BackgroundBlur.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Camera.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/FullScreen/FullScreen.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Hangup/Hangup.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Microphone.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Minimize/Minimize.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Reject/Reject.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/Speaker.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/SwitchAudioCall.d.ts +2 -1
- package/types/Components/components/common/ButtonPanel/button/SwitchCamera.d.ts +2 -1
- package/types/Components/components/common/CallMessage/CallMessage.d.ts +1 -1
- package/types/Components/components/common/CallMessage/CallMessageC2C/CallMessageC2C.d.ts +2 -1
- package/types/Components/components/common/CallMessage/CallMessageGroup/CallMessageGroup.d.ts +2 -1
- package/types/Components/components/common/DeviceSelector/DeviceSelector.d.ts +2 -1
- package/types/Components/components/common/FloatingWindow/FloatingWindow.d.ts +2 -2
- package/types/Components/components/common/FloatingWindow/FloatingWindowGroupCall/FloatingWindowGroupCall.d.ts +2 -2
- package/types/Components/components/common/FloatingWindow/FloatingWindowSingleCall/FloatingWindowSingleCall.d.ts +2 -2
- package/types/Components/components/common/MicrophoneVolumn/MicrophoneVolumn.d.ts +2 -2
- package/types/Components/components/common/OverlayStream/OverlayStream.d.ts +2 -2
- package/types/Components/components/common/Player/Player.d.ts +2 -2
- package/types/Components/components/common/Pusher/Pusher.d.ts +1 -1
- package/types/Components/components/common/StreamInfo/StreamInfo.d.ts +2 -1
- package/types/Components/components/common/StreamInfo/StreamInfoH5/StreamInfoH5.d.ts +2 -1
- package/types/Components/components/common/StreamInfo/StreamInfoPC/StreamInfoPC.d.ts +2 -1
- package/types/Components/components/common/Tip/Tip.d.ts +2 -2
- package/types/Components/components/common/TopBar/TopBar.d.ts +2 -1
- package/types/Components/components/common/TopBar/h5/TopBarH5.d.ts +2 -1
- package/types/Components/components/common/TopBar/pc/TopBarPC.d.ts +2 -1
- package/types/TUICallService/CallService/index.d.ts +1 -0
- package/types/TUICallService/interface/ICallStore.d.ts +1 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@trtc/calls-uikit-react",
|
|
3
|
-
"version": "4.5.
|
|
3
|
+
"version": "4.5.3-beta.1",
|
|
4
4
|
"main": "./tuicall-uikit-react.umd.js",
|
|
5
5
|
"module": "./tuicall-uikit-react.es.js",
|
|
6
6
|
"types": "./types/index.d.ts",
|
|
@@ -14,9 +14,8 @@
|
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
16
|
"@tencentcloud/tui-core-lite": "~1.0.1",
|
|
17
|
-
"@trtc/call-engine-lite-js": "
|
|
18
|
-
"@tencentcloud/lite-chat": "^1.6.3"
|
|
19
|
-
"@trtc/call-engine-lite-wx": "~4.0.0"
|
|
17
|
+
"@trtc/call-engine-lite-js": "4.0.5-beta.1",
|
|
18
|
+
"@tencentcloud/lite-chat": "^1.6.3"
|
|
20
19
|
},
|
|
21
20
|
"bugs": {
|
|
22
21
|
"url": "https://github.com/tencentyun/TUICallKit/issues"
|
|
@@ -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.5.
|
|
30
|
+
const version = '4.5.3-beta.1';
|
|
31
31
|
import AIAssistant from './AIAssistant'; // 仅 web 支持 AI 实时字幕
|
|
32
32
|
const frameWork = 'react';
|
|
33
33
|
export { TUIGlobal, TUIStore, uiDesign };
|
|
@@ -51,6 +51,13 @@ export default class TUICallService {
|
|
|
51
51
|
private _wasmReadyPromise;
|
|
52
52
|
private _wasmReadyResolve;
|
|
53
53
|
private _isInitialized = false;
|
|
54
|
+
// Use an arrow function to keep the `this` binding when registering/unregistering the listener.
|
|
55
|
+
private _handleAutoPlayFailed = () => {
|
|
56
|
+
this._tuiCallEngine?.reportLog?.({
|
|
57
|
+
name: 'TUICallkit.onAutoPlayFailed',
|
|
58
|
+
});
|
|
59
|
+
TUIStore.update(StoreName.CALL, NAME.IS_SHOW_AUTO_PLAY_DIALOG, true);
|
|
60
|
+
};
|
|
54
61
|
|
|
55
62
|
constructor() {
|
|
56
63
|
console.log(`${NAME.PREFIX}version: ${version}`);
|
|
@@ -132,6 +139,9 @@ export default class TUICallService {
|
|
|
132
139
|
trtcCloudInstance?.callExperimentalAPI(JSON.stringify(
|
|
133
140
|
{ "api": "enableAutoPlayDialog","params": { "enable": 0 } }
|
|
134
141
|
));
|
|
142
|
+
// Register the auto play failed listener at initialization time, otherwise the event may
|
|
143
|
+
// be fired before the AutoPlayDialog component is mounted and the listener would miss it.
|
|
144
|
+
trtcCloudInstance?.on?.('onAutoPlayFailed', this._handleAutoPlayFailed);
|
|
135
145
|
this._tuiCallEngine?.reportLog?.({
|
|
136
146
|
name: 'TUICallkit.init',
|
|
137
147
|
data: {
|
|
@@ -153,6 +163,8 @@ export default class TUICallService {
|
|
|
153
163
|
}
|
|
154
164
|
if (this._tuiCallEngine) {
|
|
155
165
|
this._removeListenTuiCallEngineEvent();
|
|
166
|
+
const trtcCloudInstance = this._tuiCallEngine?.getTRTCCloudInstance?.();
|
|
167
|
+
trtcCloudInstance?.off?.('onAutoPlayFailed', this._handleAutoPlayFailed);
|
|
156
168
|
await this._tuiCallEngine.destroyInstance();
|
|
157
169
|
this._tuiCallEngine = null;
|
|
158
170
|
}
|
|
@@ -338,6 +350,9 @@ export default class TUICallService {
|
|
|
338
350
|
const { enable } = params;
|
|
339
351
|
TUIStore.update(StoreName.CALL, NAME.IS_FORCE_USE_V2_API, !!enable);
|
|
340
352
|
break;
|
|
353
|
+
case 'setWaterMark':
|
|
354
|
+
this._tuiCallEngine?.callExperimentalAPI?.(jsonStr);
|
|
355
|
+
break;
|
|
341
356
|
default:
|
|
342
357
|
break;
|
|
343
358
|
}
|
|
@@ -26,6 +26,7 @@ export const CALL_DATA_KEY: any = {
|
|
|
26
26
|
PLAYER: 'player',
|
|
27
27
|
IS_EAR_PHONE: 'isEarPhone',
|
|
28
28
|
IS_MUTE_SPEAKER: 'isMuteSpeaker',
|
|
29
|
+
IS_SHOW_AUTO_PLAY_DIALOG: 'isShowAutoPlayDialog',
|
|
29
30
|
SHOW_PERMISSION_TIP: 'SHOW_PERMISSION_TIP',
|
|
30
31
|
NETWORK_STATUS: 'NetWorkStatus',
|
|
31
32
|
CALL_ID: 'callID',
|
|
@@ -34,6 +34,7 @@ export interface ICallStore {
|
|
|
34
34
|
roomIdType: number;
|
|
35
35
|
cameraPosition: CameraPosition; // 前置或后置,值为front, back
|
|
36
36
|
isMuteSpeaker: boolean;
|
|
37
|
+
isShowAutoPlayDialog: boolean; // 是否显示自动播放失败弹窗, 默认: false
|
|
37
38
|
groupCallMembers: IUserInfo[]; // chat 群会话中在通话的成员
|
|
38
39
|
// TUICallKit 组件上的属性
|
|
39
40
|
displayMode: VideoDisplayMode; // 设置预览远端的画面显示模式, 默认: VideoDisplayMode.COVER
|