@tencentcloud/tuiroom-engine-electron 2.2.2 → 2.3.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/index.cjs.js +1 -1
- package/index.d.ts +28 -7
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +5 -4
- package/types.d.ts +0 -637
package/index.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
1
|
+
import { ChatSDK } from '@tencentcloud/chat';
|
|
2
2
|
export { default as TIM, default as TencentCloudChat } from '@tencentcloud/chat';
|
|
3
3
|
import TRTCCloud, { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-electron-sdk';
|
|
4
|
-
export { Rect, default as TRTCCloud, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType,
|
|
4
|
+
export { Rect, default as TRTCCloud, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCScreenCaptureProperty, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo } from 'trtc-electron-sdk';
|
|
5
5
|
|
|
6
6
|
declare enum TUIErrorCode {
|
|
7
7
|
ERR_SUCC = 0,
|
|
@@ -165,7 +165,7 @@ type TUIVideoEncoderParams = {
|
|
|
165
165
|
};
|
|
166
166
|
declare enum TUIRoomType {
|
|
167
167
|
kConference = 1,
|
|
168
|
-
|
|
168
|
+
kLive = 2
|
|
169
169
|
}
|
|
170
170
|
declare enum TUISpeechMode {
|
|
171
171
|
kFreeToSpeak = 1,
|
|
@@ -228,11 +228,14 @@ type TUIUserInfo = {
|
|
|
228
228
|
hasAudioStream: boolean;
|
|
229
229
|
hasVideoStream: boolean;
|
|
230
230
|
hasScreenStream: boolean;
|
|
231
|
+
isMessageDisabled: boolean;
|
|
231
232
|
roomCustomInfo: Record<string, any>;
|
|
232
233
|
};
|
|
233
234
|
type TUISeatInfo = {
|
|
234
235
|
index: number;
|
|
235
236
|
userId: string;
|
|
237
|
+
userName: string;
|
|
238
|
+
avatarUrl: string;
|
|
236
239
|
locked: boolean;
|
|
237
240
|
isVideoLocked: boolean;
|
|
238
241
|
isAudioLocked: boolean;
|
|
@@ -242,6 +245,8 @@ type TUIRequest = {
|
|
|
242
245
|
timestamp: number;
|
|
243
246
|
requestId: string;
|
|
244
247
|
userId: string;
|
|
248
|
+
userName: string;
|
|
249
|
+
avatarUrl: string;
|
|
245
250
|
content: string;
|
|
246
251
|
};
|
|
247
252
|
type TUIRequestCallback = {
|
|
@@ -392,6 +397,19 @@ declare enum TUIRoomEvents {
|
|
|
392
397
|
* });
|
|
393
398
|
*/
|
|
394
399
|
onRoomSeatModeChanged = "onRoomSeatModeChanged",
|
|
400
|
+
/**
|
|
401
|
+
* @description 房间内人数变化事件
|
|
402
|
+
* @default 'onRoomUserCountChanged'
|
|
403
|
+
* @event TUIRoomEvents#onRoomUserCountChanged
|
|
404
|
+
* @param {object} options
|
|
405
|
+
* @param {number} options.userCount 房间内人数
|
|
406
|
+
* @example
|
|
407
|
+
* const roomEngine = new TUIRoomEngine();
|
|
408
|
+
* roomEngine.on(TUIRoomEvents.onRoomUserCountChanged, ({ roomId, userCount }) =>{
|
|
409
|
+
* console.log('roomEngine.onRoomUserCountChanged', roomId, userCount);
|
|
410
|
+
* });
|
|
411
|
+
*/
|
|
412
|
+
onRoomUserCountChanged = "onRoomUserCountChanged",
|
|
395
413
|
/**
|
|
396
414
|
* @description 所有成员摄像头使用权限改变事件
|
|
397
415
|
* @default 'onAllUserCameraDisableChanged'
|
|
@@ -982,7 +1000,7 @@ declare class TUIRoomEngine {
|
|
|
982
1000
|
sdkAppId: number;
|
|
983
1001
|
userId: string;
|
|
984
1002
|
userSig: string;
|
|
985
|
-
tim?:
|
|
1003
|
+
tim?: ChatSDK;
|
|
986
1004
|
}): Promise<void>;
|
|
987
1005
|
/**
|
|
988
1006
|
* 设置当前用户基本信息(用户名、用户头像)
|
|
@@ -1054,7 +1072,7 @@ declare class TUIRoomEngine {
|
|
|
1054
1072
|
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1055
1073
|
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)<br>
|
|
1056
1074
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
1057
|
-
* roomType 为 TUIRoomType.
|
|
1075
|
+
* roomType 为 TUIRoomType.kLive(直播场景) 时,maxSeatCount 最大限制为 16;
|
|
1058
1076
|
* @returns {Promise<void>}
|
|
1059
1077
|
*
|
|
1060
1078
|
* @example
|
|
@@ -1082,6 +1100,7 @@ declare class TUIRoomEngine {
|
|
|
1082
1100
|
* 进入房间接口
|
|
1083
1101
|
* @param {object} options
|
|
1084
1102
|
* @param {string} options.roomId 房间号,字符串类型
|
|
1103
|
+
* @param {TUIRoomType} options.roomType 房间类型, 默认值为 TUIRoomType.kConference (自 v2.3.0 支持)
|
|
1085
1104
|
* @returns {Promise<TUIRoomInfo>} roomInfo
|
|
1086
1105
|
* 该接口返回当前房间信息
|
|
1087
1106
|
*
|
|
@@ -1089,10 +1108,12 @@ declare class TUIRoomEngine {
|
|
|
1089
1108
|
* const roomEngine = new TUIRoomEngine();
|
|
1090
1109
|
* const roomDetailInfo = await roomEngine.enterRoom({
|
|
1091
1110
|
* roomId: '12345',
|
|
1111
|
+
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1092
1112
|
* });
|
|
1093
1113
|
*/
|
|
1094
1114
|
enterRoom(options: {
|
|
1095
1115
|
roomId: string;
|
|
1116
|
+
roomType: TUIRoomType;
|
|
1096
1117
|
}): Promise<TUIRoomInfo>;
|
|
1097
1118
|
/**
|
|
1098
1119
|
* 解散房间接口,解散房间必须由房间所有者发起,解散房间之后房间不可进入
|
|
@@ -1755,7 +1776,7 @@ declare class TUIRoomEngine {
|
|
|
1755
1776
|
* @param {object} options
|
|
1756
1777
|
* @param {number} options.maxSeatCount 设置房间麦位最大值<br/>
|
|
1757
1778
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
1758
|
-
* roomType 为 TUIRoomType.
|
|
1779
|
+
* roomType 为 TUIRoomType.kLive(直播场景) 时,maxSeatCount 最大限制为 16;
|
|
1759
1780
|
* @returns {Promise<void>}
|
|
1760
1781
|
* const roomEngine = new TUIRoomEngine();
|
|
1761
1782
|
* await roomEngine.createRoom({ roomId: '12345' });
|
|
@@ -2227,7 +2248,7 @@ declare class TUIRoomEngine {
|
|
|
2227
2248
|
* const roomEngine = new TUIRoomEngine();
|
|
2228
2249
|
* const trtcCloud = roomEngine.getTIM();
|
|
2229
2250
|
*/
|
|
2230
|
-
getTIM():
|
|
2251
|
+
getTIM(): ChatSDK;
|
|
2231
2252
|
destroy(): void;
|
|
2232
2253
|
/**
|
|
2233
2254
|
* 实验性接口
|