@tencentcloud/tuiroom-engine-electron 2.4.1 → 2.5.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/README.md +0 -1
- package/index.cjs.js +1 -1
- package/index.d.ts +461 -36
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -27,11 +27,12 @@ declare enum TUIErrorCode {
|
|
|
27
27
|
ERR_OPERATION_INVALID_BEFORE_ENTER_ROOM = -2101,
|
|
28
28
|
ERR_EXIT_NOT_SUPPORTED_FOR_ROOM_OWNER = -2102,
|
|
29
29
|
ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_ROOM_TYPE = -2103,
|
|
30
|
-
ERR_OPERATION_NOT_SUPPORTED_IN_CURRENT_SPEECH_MODE = -2104,
|
|
31
30
|
ERR_ROOM_ID_INVALID = -2105,
|
|
32
31
|
ERR_ROOM_ID_OCCUPIED = -2106,
|
|
33
32
|
ERR_ROOM_NAME_INVALID = -2107,
|
|
34
33
|
ERR_ALREADY_IN_OTHER_ROOM = -2108,
|
|
34
|
+
ERR_NEED_PASSWORD = -2109,
|
|
35
|
+
ERR_WRONG_PASSWORD = -2110,
|
|
35
36
|
ERR_ROOM_USER_FULL = -2111,
|
|
36
37
|
ERR_USER_NOT_EXIST = -2200,
|
|
37
38
|
ERR_USER_NOT_ENTERED = -2201,
|
|
@@ -64,6 +65,7 @@ type TUIRoomInfo = {
|
|
|
64
65
|
roomType: TUIRoomType;
|
|
65
66
|
isSeatEnabled: boolean;
|
|
66
67
|
seatMode: TUISeatMode;
|
|
68
|
+
password: string;
|
|
67
69
|
isMicrophoneDisableForAllUser: boolean;
|
|
68
70
|
isScreenShareDisableForAllUser: boolean;
|
|
69
71
|
isCameraDisableForAllUser: boolean;
|
|
@@ -76,6 +78,9 @@ type TUIRoomInfo = {
|
|
|
76
78
|
createTime: number;
|
|
77
79
|
roomMemberCount: number;
|
|
78
80
|
};
|
|
81
|
+
type TUIEnterRoomOptions = {
|
|
82
|
+
password: string;
|
|
83
|
+
};
|
|
79
84
|
type TUILoginUserInfo = {
|
|
80
85
|
userId: string;
|
|
81
86
|
userName: string;
|
|
@@ -171,11 +176,6 @@ declare enum TUIRoomType {
|
|
|
171
176
|
kConference = 1,
|
|
172
177
|
kLive = 2
|
|
173
178
|
}
|
|
174
|
-
declare enum TUISpeechMode {
|
|
175
|
-
kFreeToSpeak = 1,
|
|
176
|
-
kApplyToSpeak = 2,
|
|
177
|
-
kSpeakAfterTakingSeat = 3
|
|
178
|
-
}
|
|
179
179
|
declare enum TUISeatMode {
|
|
180
180
|
kFreeToTake = 1,
|
|
181
181
|
kApplyToTake = 2
|
|
@@ -231,6 +231,7 @@ declare enum TUIRoomDismissedReason {
|
|
|
231
231
|
type TUIUserInfo = {
|
|
232
232
|
userId: string;
|
|
233
233
|
userName: string;
|
|
234
|
+
nameCard: string;
|
|
234
235
|
avatarUrl: string;
|
|
235
236
|
userRole: TUIRole;
|
|
236
237
|
hasAudioStream: boolean;
|
|
@@ -243,6 +244,7 @@ type TUISeatInfo = {
|
|
|
243
244
|
index: number;
|
|
244
245
|
userId: string;
|
|
245
246
|
userName: string;
|
|
247
|
+
nameCard: string;
|
|
246
248
|
avatarUrl: string;
|
|
247
249
|
locked: boolean;
|
|
248
250
|
isVideoLocked: boolean;
|
|
@@ -254,6 +256,7 @@ type TUIRequest = {
|
|
|
254
256
|
requestId: string;
|
|
255
257
|
userId: string;
|
|
256
258
|
userName: string;
|
|
259
|
+
nameCard: string;
|
|
257
260
|
avatarUrl: string;
|
|
258
261
|
content: string;
|
|
259
262
|
};
|
|
@@ -289,6 +292,31 @@ type TUIDeviceInfo = {
|
|
|
289
292
|
}[];
|
|
290
293
|
};
|
|
291
294
|
};
|
|
295
|
+
declare enum TUIConferenceStatus {
|
|
296
|
+
kConferenceStatusNone = 0,
|
|
297
|
+
kConferenceStatusNotStarted = 1,
|
|
298
|
+
kConferenceStatusRunning = 2
|
|
299
|
+
}
|
|
300
|
+
declare enum TUIConferenceCancelReason {
|
|
301
|
+
kConferenceCancelReasonCancelledByAdmin = 0,
|
|
302
|
+
kConferenceCancelReasonRemovedFromAttendees = 1
|
|
303
|
+
}
|
|
304
|
+
type TUIConferenceInfo = {
|
|
305
|
+
scheduleStartTime: number;
|
|
306
|
+
scheduleEndTime: number;
|
|
307
|
+
scheduleAttendees: string[];
|
|
308
|
+
reminderSecondsBeforeStart: number;
|
|
309
|
+
status: TUIConferenceStatus;
|
|
310
|
+
basicRoomInfo: TUIRoomInfo;
|
|
311
|
+
};
|
|
312
|
+
type TUIConferenceModifyInfo = {
|
|
313
|
+
scheduleStartTime?: number;
|
|
314
|
+
scheduleEndTime?: number;
|
|
315
|
+
basicRoomInfo: {
|
|
316
|
+
roomId: string;
|
|
317
|
+
roomName?: string;
|
|
318
|
+
};
|
|
319
|
+
};
|
|
292
320
|
/**
|
|
293
321
|
* **TUIRoomEngine 事件列表**<br>
|
|
294
322
|
* @namespace TUIRoomEvents
|
|
@@ -379,20 +407,6 @@ declare enum TUIRoomEvents {
|
|
|
379
407
|
* });
|
|
380
408
|
*/
|
|
381
409
|
onRoomNameChanged = "onRoomNameChanged",
|
|
382
|
-
/**
|
|
383
|
-
* @description 房间模式修改事件
|
|
384
|
-
* @deprecated 该事件自 v2.0.0 版本废弃
|
|
385
|
-
* @default 'onRoomSpeechModeChanged'
|
|
386
|
-
* @event TUIRoomEvents#onRoomSpeechModeChanged
|
|
387
|
-
* @param {object} options
|
|
388
|
-
* @param {TUISpeechMode} options.speechMode 房间模式
|
|
389
|
-
* @example
|
|
390
|
-
* const roomEngine = new TUIRoomEngine();
|
|
391
|
-
* roomEngine.on(TUIRoomEvents.onRoomSpeechModeChanged, ({ roomId, speechMode }) =>{
|
|
392
|
-
* console.log('roomEngine.onRoomSpeechModeChanged', roomId, speechMode);
|
|
393
|
-
* });
|
|
394
|
-
*/
|
|
395
|
-
onRoomSpeechModeChanged = "onRoomSpeechModeChanged",
|
|
396
410
|
/**
|
|
397
411
|
* @description 上麦模式修改事件
|
|
398
412
|
* @default 'onRoomSeatModeChanged'
|
|
@@ -513,9 +527,24 @@ declare enum TUIRoomEvents {
|
|
|
513
527
|
* });
|
|
514
528
|
*/
|
|
515
529
|
onRemoteUserLeaveRoom = "onRemoteUserLeaveRoom",
|
|
530
|
+
/**
|
|
531
|
+
* @since v2.5.0
|
|
532
|
+
* @description 房间内用户信息改变事件
|
|
533
|
+
* @default 'onUserInfoChanged'
|
|
534
|
+
* @event TUIRoomEvents#onUserInfoChanged
|
|
535
|
+
* @param {object} options
|
|
536
|
+
* @param {TUIUserInfo} options.userInfo 用户信息
|
|
537
|
+
* @example
|
|
538
|
+
* const roomEngine = new TUIRoomEngine();
|
|
539
|
+
* roomEngine.on(TUIRoomEvents.onUserInfoChanged, ({ userInfo }) => {
|
|
540
|
+
* console.log('roomEngine.onUserInfoChanged', userInfo);
|
|
541
|
+
* });
|
|
542
|
+
*/
|
|
543
|
+
onUserInfoChanged = "onUserInfoChanged",
|
|
516
544
|
/**
|
|
517
545
|
* @description 用户角色改变事件
|
|
518
|
-
* @
|
|
546
|
+
* @deprecated 该接口自 v2.5.0 版本废弃,请使用'onUserInfoChanged'.
|
|
547
|
+
* @default 'onUserRoleChanged'
|
|
519
548
|
* @event TUIRoomEvents#onUserRoleChanged
|
|
520
549
|
* @param {object} options
|
|
521
550
|
* @param {string} options.userId 用户Id
|
|
@@ -779,6 +808,104 @@ declare enum TUIRoomDeviceMangerEvents {
|
|
|
779
808
|
* });
|
|
780
809
|
*/
|
|
781
810
|
onTestSpeakerVolume = "onTestSpeakerVolume"
|
|
811
|
+
}
|
|
812
|
+
/**
|
|
813
|
+
* @since v2.5.0
|
|
814
|
+
* **TUIConferenceListManager 事件列表**<br>
|
|
815
|
+
* @namespace TUIConferenceListManagerEvents
|
|
816
|
+
*/
|
|
817
|
+
declare enum TUIConferenceListManagerEvents {
|
|
818
|
+
/**
|
|
819
|
+
* @description 会议预定回调
|
|
820
|
+
* @default 'onConferenceScheduled'
|
|
821
|
+
* @event TUIConferenceListManagerEvents#onConferenceScheduled
|
|
822
|
+
* @param {object} options
|
|
823
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
824
|
+
*
|
|
825
|
+
* @example
|
|
826
|
+
* const roomEngine = new TUIRoomEngine();
|
|
827
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
828
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceScheduled, ({ conferenceInfo }) => {
|
|
829
|
+
* console.log('conferenceListManager.onConferenceScheduled', conferenceInfo);
|
|
830
|
+
* })
|
|
831
|
+
*/
|
|
832
|
+
onConferenceScheduled = "onConferenceScheduled",
|
|
833
|
+
/**
|
|
834
|
+
* @description 会议即将开始回调
|
|
835
|
+
* @default 'onConferenceWillStart'
|
|
836
|
+
* @event TUIConferenceListManagerEvents#onConferenceWillStart
|
|
837
|
+
* @param {object} options
|
|
838
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
839
|
+
*
|
|
840
|
+
* @example
|
|
841
|
+
* const roomEngine = new TUIRoomEngine();
|
|
842
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
843
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceWillStart, ({ conferenceInfo }) => {
|
|
844
|
+
* console.log('conferenceListManager.onConferenceWillStart', conferenceInfo);
|
|
845
|
+
* })
|
|
846
|
+
*/
|
|
847
|
+
onConferenceWillStart = "onConferenceWillStart",
|
|
848
|
+
/**
|
|
849
|
+
* @description 会议取消回调
|
|
850
|
+
*
|
|
851
|
+
* @param {object} options
|
|
852
|
+
* @param {string} options.roomId 会议Id,即房间 roomId 。
|
|
853
|
+
* @param {TUIConferenceCancelReason} options.reason 会议取消原因。
|
|
854
|
+
* @param {TUIUserInfo} options.operateUser 取消会议操作者信息。
|
|
855
|
+
*
|
|
856
|
+
* @example
|
|
857
|
+
* const roomEngine = new TUIRoomEngine();
|
|
858
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
859
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceCancelled, ({ roomId, reason, operateUser }) => {
|
|
860
|
+
* console.log('conferenceListManager.onConferenceCancelled', roomId, reason, operateUser);
|
|
861
|
+
* })
|
|
862
|
+
*/
|
|
863
|
+
onConferenceCancelled = "onConferenceCancelled",
|
|
864
|
+
/**
|
|
865
|
+
* @description 会议信息变更回调
|
|
866
|
+
*
|
|
867
|
+
* @param {object} options
|
|
868
|
+
* @param {TUIConferenceModifyInfo} options.conferenceModifyInfo 会议信息。
|
|
869
|
+
*
|
|
870
|
+
* @example
|
|
871
|
+
* const roomEngine = new TUIRoomEngine();
|
|
872
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
873
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceInfoChanged, ({ conferenceModifyInfo }) => {
|
|
874
|
+
* console.log('conferenceListManager.onConferenceInfoChanged', conferenceModifyInfo);
|
|
875
|
+
* })
|
|
876
|
+
*/
|
|
877
|
+
onConferenceInfoChanged = "onConferenceInfoChanged",
|
|
878
|
+
/**
|
|
879
|
+
* @description 参会人员变更回调
|
|
880
|
+
*
|
|
881
|
+
* @param {object} options
|
|
882
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
883
|
+
* @param {Array<TUIUserInfo>} options.leftUsers 离开成员列表。
|
|
884
|
+
* @param {Array<TUIUserInfo>} options.joinedUsers 新加入成员列表。
|
|
885
|
+
*
|
|
886
|
+
* @example
|
|
887
|
+
* const roomEngine = new TUIRoomEngine();
|
|
888
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
889
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onScheduleAttendeesChanged, ({ roomId, leftUsers, joinedUsers }) => {
|
|
890
|
+
* console.log('conferenceListManager.onScheduleAttendeesChanged', roomId, leftUsers, joinedUsers);
|
|
891
|
+
* })
|
|
892
|
+
*/
|
|
893
|
+
onScheduleAttendeesChanged = "onScheduleAttendeesChanged",
|
|
894
|
+
/**
|
|
895
|
+
* @description 会议状态变更回调
|
|
896
|
+
*
|
|
897
|
+
* @param {object} options
|
|
898
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
899
|
+
* @param {TUIConferenceStatus} options.status 会议状态。
|
|
900
|
+
*
|
|
901
|
+
* @example
|
|
902
|
+
* const roomEngine = new TUIRoomEngine();
|
|
903
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
904
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceStatusChanged, ({ roomId, status }) => {
|
|
905
|
+
* console.log('conferenceListManager.onConferenceStatusChanged', roomId, status );
|
|
906
|
+
* })
|
|
907
|
+
*/
|
|
908
|
+
onConferenceStatusChanged = "onConferenceStatusChanged"
|
|
782
909
|
}
|
|
783
910
|
|
|
784
911
|
declare class Logger {
|
|
@@ -810,9 +937,11 @@ declare class TUIRoomDeviceManager {
|
|
|
810
937
|
private deviceManagerWASM;
|
|
811
938
|
private logger;
|
|
812
939
|
private static deviceManager;
|
|
940
|
+
private trtcCloud;
|
|
813
941
|
constructor(options: {
|
|
814
942
|
Module: any;
|
|
815
943
|
logger: Logger;
|
|
944
|
+
trtcCloud: TRTCCloud;
|
|
816
945
|
});
|
|
817
946
|
setDeviceManagerWASM(deviceManagerWASM: any): void;
|
|
818
947
|
/**
|
|
@@ -959,6 +1088,248 @@ declare class TUIRoomDeviceManager {
|
|
|
959
1088
|
off(event: string, func: (...args: any[]) => void): void;
|
|
960
1089
|
}
|
|
961
1090
|
|
|
1091
|
+
/**
|
|
1092
|
+
* 会议列表
|
|
1093
|
+
* @class conferenceListManager
|
|
1094
|
+
*/
|
|
1095
|
+
declare class TUIConferenceListManager {
|
|
1096
|
+
private static readonly ROOM_NAME;
|
|
1097
|
+
private static readonly SCHEDULED_START_TIME;
|
|
1098
|
+
private static readonly SCHEDULED_END_TIME;
|
|
1099
|
+
private conferenceListManagerWASM;
|
|
1100
|
+
private logger;
|
|
1101
|
+
private static conferenceListManager;
|
|
1102
|
+
constructor(options: {
|
|
1103
|
+
Module: any;
|
|
1104
|
+
logger: Logger;
|
|
1105
|
+
});
|
|
1106
|
+
setConferenceListManagerWASM(conferenceListManager: any): void;
|
|
1107
|
+
/**
|
|
1108
|
+
* @private
|
|
1109
|
+
* 调用 TUIRoomEngineWASM 的异步方法
|
|
1110
|
+
* @param funcName
|
|
1111
|
+
* @param args
|
|
1112
|
+
*/
|
|
1113
|
+
private JSCallNativeFunctionPromise;
|
|
1114
|
+
/**
|
|
1115
|
+
* 预定会议
|
|
1116
|
+
* @param {object} options
|
|
1117
|
+
* @param {string} options.roomId 房间 Id,必填, roomId 限制长度为64字节,且仅支持以下范围的字符集:<br>
|
|
1118
|
+
* - 大小写英文字母(a-zA-Z)
|
|
1119
|
+
* - 数字(0-9)
|
|
1120
|
+
* - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
|
|
1121
|
+
* @param {number} [options.scheduleStartTime] 预定会议开始时间(计数单位为秒的时间戳)
|
|
1122
|
+
* @param {number} [options.scheduleEndTime] 预定会议结束时间(计数单位为秒的时间戳)
|
|
1123
|
+
* @param {array=} [options.scheduleAttendees=[]] 预定会议邀请成员 userId 列表
|
|
1124
|
+
* @param {number=} [options.reminderSecondsBeforeStart=0] 会议开始前提醒时间,单位秒
|
|
1125
|
+
* @param {string=} [options.roomName=roomId] 房间名称,默认值为 roomId,传入的值不能为空字符串
|
|
1126
|
+
* @param {TUIRoomType=} [options.roomType=TUIRoomType.kConference] 房间类型, 默认值为 TUIRoomType.kConference <br>
|
|
1127
|
+
* 办公协同、医疗问诊、远程会议、教育场景,roomType 设置为 TUIRoomType.kConference
|
|
1128
|
+
* 电商直播、语聊房场景,roomType 设置为 TUIRoomType.kLive
|
|
1129
|
+
* @param {boolean=} [options.isSeatEnabled=false] 是否开启麦位控制,默认值为 false
|
|
1130
|
+
* @param {TUISeatMode=} [options.seatMode=TUISeatMode.kFreeToTake] 上麦模式(开启麦位控制后生效),默认值为 TUISeatMode.kFreeToTake <br>
|
|
1131
|
+
* 自由上麦模式,台下观众可以自由上麦,无需申请,seatMode 设置为 TUISeatMode.kFreeToTake
|
|
1132
|
+
* 申请上麦模式,台下观众上麦需要房主或者管理员同意后才能上麦,seatMode 设置为 TUISeatMode.kApplyToTake
|
|
1133
|
+
* @param {boolean=} [options.isMicrophoneDisableForAllUser=false] 是否开启全员禁麦,默认不开启全员禁麦(创建房间可选参数)
|
|
1134
|
+
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1135
|
+
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1136
|
+
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1137
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1138
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持)
|
|
1139
|
+
* @returns {Promise<void>}
|
|
1140
|
+
*
|
|
1141
|
+
* @example
|
|
1142
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1143
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1144
|
+
* await conferenceListManager.scheduleConference({
|
|
1145
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1146
|
+
* scheduleStartTime: 1720004257, // 填入您的会议预定开始时间的时间戳,单位秒。
|
|
1147
|
+
* scheduleEndTime: 1720001317, // 填入您的会议预定结束时间的时间戳,单位秒。
|
|
1148
|
+
* });
|
|
1149
|
+
*/
|
|
1150
|
+
scheduleConference(options: {
|
|
1151
|
+
scheduleStartTime: number;
|
|
1152
|
+
scheduleEndTime: number;
|
|
1153
|
+
scheduleAttendees?: string[];
|
|
1154
|
+
reminderSecondsBeforeStart?: number;
|
|
1155
|
+
roomId: string;
|
|
1156
|
+
roomName?: string;
|
|
1157
|
+
roomType?: TUIRoomType;
|
|
1158
|
+
isSeatEnabled?: boolean;
|
|
1159
|
+
seatMode?: TUISeatMode;
|
|
1160
|
+
isMicrophoneDisableForAllUser?: boolean;
|
|
1161
|
+
isScreenShareDisableForAllUser?: boolean;
|
|
1162
|
+
isCameraDisableForAllUser?: boolean;
|
|
1163
|
+
isMessageDisableForAllUser?: boolean;
|
|
1164
|
+
maxSeatCount?: number;
|
|
1165
|
+
password?: string;
|
|
1166
|
+
}): Promise<void>;
|
|
1167
|
+
/**
|
|
1168
|
+
* 取消预定会议
|
|
1169
|
+
*
|
|
1170
|
+
* @param {object} options
|
|
1171
|
+
* @param {string} options.roomId 要取消会议Id,即房间roomId。
|
|
1172
|
+
* @returns {Promise<void>}
|
|
1173
|
+
*
|
|
1174
|
+
* @example
|
|
1175
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1176
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1177
|
+
* await conferenceListManager.cancelConference({
|
|
1178
|
+
* roomId: '12345', // 填入您要取消的会议 Id ,即房间 roomId 。
|
|
1179
|
+
* });
|
|
1180
|
+
*/
|
|
1181
|
+
cancelConference(options: {
|
|
1182
|
+
roomId: string;
|
|
1183
|
+
}): Promise<void>;
|
|
1184
|
+
/**
|
|
1185
|
+
* 更新预定会议信息
|
|
1186
|
+
*
|
|
1187
|
+
* @param {object} options
|
|
1188
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1189
|
+
* @param {string} options.roomName 会议的名称。
|
|
1190
|
+
* @param {string} options.scheduleStartTime 预定会议的开始时间(计数单位为秒的时间戳)。
|
|
1191
|
+
* @param {string} options.scheduleEndTime 预定会议的结束时间(计数单位为秒的时间戳)。
|
|
1192
|
+
* @returns {Promise<void>}
|
|
1193
|
+
*
|
|
1194
|
+
* @example
|
|
1195
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1196
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1197
|
+
* await conferenceListManager.updateConferenceInfo({
|
|
1198
|
+
* roomId: '12345', // 填入您要更新的会议房间 roomId 。
|
|
1199
|
+
* roomName: 'myRoomName', // 填入您更新后的会议名称。
|
|
1200
|
+
* scheduleStartTime: 1720004257, // 填入您更新后的会议预定开始时间的时间戳,单位秒。
|
|
1201
|
+
* scheduleEndTime: 1720001317, // 填入您更新后的会议预定结束时间的时间戳,单位秒。
|
|
1202
|
+
* });
|
|
1203
|
+
*/
|
|
1204
|
+
updateConferenceInfo(options: {
|
|
1205
|
+
roomId: string;
|
|
1206
|
+
roomName?: string;
|
|
1207
|
+
scheduleStartTime?: number;
|
|
1208
|
+
scheduleEndTime?: number;
|
|
1209
|
+
}): Promise<void>;
|
|
1210
|
+
/**
|
|
1211
|
+
* 获取预定会议列表
|
|
1212
|
+
*
|
|
1213
|
+
* @param {object} options
|
|
1214
|
+
* @param {object} options.statusArray 会议状态数组,默认值为拉取全部状态会议。
|
|
1215
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 '',回调成功 如果callback返回的数据中 cursor 不为 '',表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的cursor为 '',表示数据已经全部拉取。
|
|
1216
|
+
* @param {string} options.count 本次拉取数量。
|
|
1217
|
+
*
|
|
1218
|
+
* @example
|
|
1219
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1220
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1221
|
+
* const conferenceList = [];
|
|
1222
|
+
* let result;
|
|
1223
|
+
* let cursor = '';
|
|
1224
|
+
* let count = 20;
|
|
1225
|
+
* do {
|
|
1226
|
+
* result = await conferenceListManager.fetchScheduledConferenceList({ cursor, count });
|
|
1227
|
+
* conferenceList.push(...result.conferenceList);
|
|
1228
|
+
* cursor = result.cursor;
|
|
1229
|
+
* } while (cursor !== '')
|
|
1230
|
+
*/
|
|
1231
|
+
fetchScheduledConferenceList(options: {
|
|
1232
|
+
statusArray?: TUIConferenceStatus[];
|
|
1233
|
+
cursor: string;
|
|
1234
|
+
count: number;
|
|
1235
|
+
}): Promise<Array<TUIConferenceInfo>>;
|
|
1236
|
+
/**
|
|
1237
|
+
* 获取预定会议邀请成员列表
|
|
1238
|
+
*
|
|
1239
|
+
* @param {object} options
|
|
1240
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1241
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1242
|
+
* @param {string} options.count 本次拉取数量。
|
|
1243
|
+
*
|
|
1244
|
+
* @example
|
|
1245
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1246
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1247
|
+
* const attendeeList = [];
|
|
1248
|
+
* let result;
|
|
1249
|
+
* let cursor = '';
|
|
1250
|
+
* let totalCount = 0;
|
|
1251
|
+
* let roomId = '12345';
|
|
1252
|
+
* let count = 20;
|
|
1253
|
+
* do {
|
|
1254
|
+
* result = await conferenceListManager.fetchAttendeeList({ roomId, cursor, count });
|
|
1255
|
+
* attendeeList.push(...result.attendeeList);
|
|
1256
|
+
* cursor = result.cursor;
|
|
1257
|
+
* totalCount = result.totalCount;
|
|
1258
|
+
* } while (cursor !== '')
|
|
1259
|
+
*/
|
|
1260
|
+
fetchAttendeeList(options: {
|
|
1261
|
+
roomId: string;
|
|
1262
|
+
cursor: string;
|
|
1263
|
+
count: number;
|
|
1264
|
+
}): Promise<Array<TUIUserInfo>>;
|
|
1265
|
+
/**
|
|
1266
|
+
* 添加成员至邀请列表
|
|
1267
|
+
*
|
|
1268
|
+
* @param {object} options
|
|
1269
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1270
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1271
|
+
* @returns {Promise<void>}
|
|
1272
|
+
*
|
|
1273
|
+
* @example
|
|
1274
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1275
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1276
|
+
* await conferenceListManager.addAttendeesByAdmin({
|
|
1277
|
+
* roomId: '12345', // 填入您要添加成员的会议 Id ,即房间 roomId 。
|
|
1278
|
+
* userIdList: ['123'], // 填入您要邀请的成员 Id 数组。
|
|
1279
|
+
* });
|
|
1280
|
+
*/
|
|
1281
|
+
addAttendeesByAdmin(options: {
|
|
1282
|
+
roomId: string;
|
|
1283
|
+
userIdList: string[];
|
|
1284
|
+
}): Promise<void>;
|
|
1285
|
+
/**
|
|
1286
|
+
* 从邀请列表移除成员
|
|
1287
|
+
*
|
|
1288
|
+
* @param {object} options
|
|
1289
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1290
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1291
|
+
* @returns {Promise<void>}
|
|
1292
|
+
*
|
|
1293
|
+
* @example
|
|
1294
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1295
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1296
|
+
* await conferenceListManager.removeAttendeesByAdmin({
|
|
1297
|
+
* roomId: '12345', // 填入您要移除成员的会议 Id ,即房间 roomId 。
|
|
1298
|
+
* userIdList: ['123'], // 填入您要移除的成员 Id 数组。
|
|
1299
|
+
* });
|
|
1300
|
+
*/
|
|
1301
|
+
removeAttendeesByAdmin(options: {
|
|
1302
|
+
roomId: string;
|
|
1303
|
+
userIdList: string[];
|
|
1304
|
+
}): Promise<void>;
|
|
1305
|
+
/**
|
|
1306
|
+
* 监听 conferenceListManager 的事件
|
|
1307
|
+
* @param event TUIConferenceListManagerEvents
|
|
1308
|
+
* @param func function
|
|
1309
|
+
* @returns {void}
|
|
1310
|
+
*
|
|
1311
|
+
* @example
|
|
1312
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1313
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1314
|
+
* conferenceListManager.on(event, func);
|
|
1315
|
+
*/
|
|
1316
|
+
on(event: TUIConferenceListManagerEvents, func: (...args: any[]) => void): void;
|
|
1317
|
+
private setObserver;
|
|
1318
|
+
private handleConferenceChangedEvent;
|
|
1319
|
+
/**
|
|
1320
|
+
* 取消监听 ConferenceListManager 的事件
|
|
1321
|
+
* @param event TUIConferenceListManagerEvents
|
|
1322
|
+
* @param func function
|
|
1323
|
+
* @returns {void}
|
|
1324
|
+
*
|
|
1325
|
+
* @example
|
|
1326
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1327
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1328
|
+
* conferenceListManager.off(event, func);
|
|
1329
|
+
*/
|
|
1330
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1331
|
+
}
|
|
1332
|
+
|
|
962
1333
|
/**
|
|
963
1334
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
964
1335
|
*
|
|
@@ -968,17 +1339,24 @@ declare class TUIRoomEngine {
|
|
|
968
1339
|
static className: string;
|
|
969
1340
|
private static isReady;
|
|
970
1341
|
private roomEngineWASM;
|
|
1342
|
+
private trtcCloud;
|
|
971
1343
|
private deviceManager;
|
|
1344
|
+
private conferenceListManager;
|
|
1345
|
+
private conferenceListManagerWASM;
|
|
972
1346
|
private static userId;
|
|
973
1347
|
private static sdkAppId;
|
|
974
1348
|
private static Module;
|
|
1349
|
+
private static shareInstance;
|
|
975
1350
|
private logger;
|
|
976
1351
|
private roomId;
|
|
977
1352
|
private localVideoQuality;
|
|
978
1353
|
private localAudioQuality;
|
|
979
1354
|
static setModule(Module: any): void;
|
|
980
1355
|
static once(event: string, func: (...args: any[]) => void): void;
|
|
981
|
-
|
|
1356
|
+
static getInstance(): TUIRoomEngine;
|
|
1357
|
+
constructor(options?: {
|
|
1358
|
+
isSharedInstance?: boolean;
|
|
1359
|
+
});
|
|
982
1360
|
/**
|
|
983
1361
|
* @private
|
|
984
1362
|
* 调用 TUIRoomEngineWASM 的静态方法
|
|
@@ -1086,7 +1464,8 @@ declare class TUIRoomEngine {
|
|
|
1086
1464
|
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1087
1465
|
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1088
1466
|
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1089
|
-
* @param {number=} options.maxSeatCount 最大麦位数量
|
|
1467
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1468
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持) <br>
|
|
1090
1469
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
1091
1470
|
* roomType 为 TUIRoomType.kLive(直播场景) 时,maxSeatCount 最大限制为 16;
|
|
1092
1471
|
* @returns {Promise<void>}
|
|
@@ -1098,6 +1477,7 @@ declare class TUIRoomEngine {
|
|
|
1098
1477
|
* roomName: 'Test Room', // 填入您的房间名称, 房间名称默认为 roomId,最长 30 字节
|
|
1099
1478
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1100
1479
|
* isSeatEnabled: false, // 不开启麦位控制
|
|
1480
|
+
* password: '1234', // 填入您的房间密码,不填入则不设置房间密码
|
|
1101
1481
|
* });
|
|
1102
1482
|
*/
|
|
1103
1483
|
createRoom(options: {
|
|
@@ -1111,12 +1491,14 @@ declare class TUIRoomEngine {
|
|
|
1111
1491
|
isCameraDisableForAllUser?: boolean;
|
|
1112
1492
|
isMessageDisableForAllUser?: boolean;
|
|
1113
1493
|
maxSeatCount?: number;
|
|
1494
|
+
password?: string;
|
|
1114
1495
|
}): Promise<void>;
|
|
1115
1496
|
/**
|
|
1116
1497
|
* 进入房间接口
|
|
1117
1498
|
* @param {object} options
|
|
1118
1499
|
* @param {string} options.roomId 房间号,字符串类型
|
|
1119
1500
|
* @param {TUIRoomType} options.roomType 房间类型, 默认值为 TUIRoomType.kConference (自 v2.3.0 支持)
|
|
1501
|
+
* @param {TUIEnterRoomOptions} options.options 进入房间的可选参数 (自 v2.5.0 支持)
|
|
1120
1502
|
* @returns {Promise<TUIRoomInfo>} roomInfo
|
|
1121
1503
|
* 该接口返回当前房间信息
|
|
1122
1504
|
*
|
|
@@ -1125,11 +1507,15 @@ declare class TUIRoomEngine {
|
|
|
1125
1507
|
* const roomDetailInfo = await roomEngine.enterRoom({
|
|
1126
1508
|
* roomId: '12345',
|
|
1127
1509
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1510
|
+
* options: {
|
|
1511
|
+
* password: '1234',
|
|
1512
|
+
* }
|
|
1128
1513
|
* });
|
|
1129
1514
|
*/
|
|
1130
1515
|
enterRoom(options: {
|
|
1131
1516
|
roomId: string;
|
|
1132
1517
|
roomType: TUIRoomType;
|
|
1518
|
+
options?: TUIEnterRoomOptions;
|
|
1133
1519
|
}): Promise<TUIRoomInfo>;
|
|
1134
1520
|
/**
|
|
1135
1521
|
* 解散房间接口,解散房间必须由房间所有者发起,解散房间之后房间不可进入
|
|
@@ -1172,16 +1558,6 @@ declare class TUIRoomEngine {
|
|
|
1172
1558
|
updateRoomNameByAdmin(options: {
|
|
1173
1559
|
roomName: string;
|
|
1174
1560
|
}): Promise<void>;
|
|
1175
|
-
/**
|
|
1176
|
-
* 更新房间的发言模式(仅群主或者管理员可以调用)
|
|
1177
|
-
* @deprecated 该接口自 v2.0.0 版本废弃
|
|
1178
|
-
* @param {object} options
|
|
1179
|
-
* @param {TUISpeechMode} options.speechMode 发言类型
|
|
1180
|
-
* @returns {Promise<void>}
|
|
1181
|
-
*/
|
|
1182
|
-
updateRoomSpeechModeByAdmin(options: {
|
|
1183
|
-
speechMode: TUISpeechMode;
|
|
1184
|
-
}): Promise<void>;
|
|
1185
1561
|
/**
|
|
1186
1562
|
* 更新房间上麦模式(仅群主或者管理员可以调用)
|
|
1187
1563
|
* 房间上麦模式更新后,roomEngine 会通过 TUIRoomEvents.onRoomSeatModeChanged 回调通知房间内用户
|
|
@@ -1199,6 +1575,23 @@ declare class TUIRoomEngine {
|
|
|
1199
1575
|
updateRoomSeatModeByAdmin(options: {
|
|
1200
1576
|
seatMode: TUISeatMode;
|
|
1201
1577
|
}): Promise<void>;
|
|
1578
|
+
/**
|
|
1579
|
+
* 更新房间密码(仅群主或者管理员可以调用)
|
|
1580
|
+
*
|
|
1581
|
+
* @since v2.5.0
|
|
1582
|
+
* @param {object} options
|
|
1583
|
+
* @param {string} options.password 房间密码
|
|
1584
|
+
* @returns {Promise<void>}
|
|
1585
|
+
*
|
|
1586
|
+
* @example
|
|
1587
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1588
|
+
* await roomEngine.updateRoomPasswordByAdmin({
|
|
1589
|
+
* password: '1234', // 更新密码为 1234
|
|
1590
|
+
* });
|
|
1591
|
+
*/
|
|
1592
|
+
updateRoomPasswordByAdmin(options: {
|
|
1593
|
+
password: string;
|
|
1594
|
+
}): Promise<void>;
|
|
1202
1595
|
/**
|
|
1203
1596
|
* 获取当前房间用户列表,注意该接口一次拉取的用户列表量最大为 50 个
|
|
1204
1597
|
*
|
|
@@ -1772,6 +2165,27 @@ declare class TUIRoomEngine {
|
|
|
1772
2165
|
userId: string;
|
|
1773
2166
|
userRole: TUIRole;
|
|
1774
2167
|
}): Promise<void>;
|
|
2168
|
+
/**
|
|
2169
|
+
* 修改房间内用户名称
|
|
2170
|
+
* @since v2.5.0
|
|
2171
|
+
* @param {object} options 修改房间内用户名称,普通成员可修改自己的,管理员可修改自己和普通成员的。
|
|
2172
|
+
* @param {string} options.userId 用户 Id
|
|
2173
|
+
* @param {string} options.nameCard 房间内用户名称
|
|
2174
|
+
* @returns {Promise<void>}
|
|
2175
|
+
*
|
|
2176
|
+
* @example
|
|
2177
|
+
* const roomEngine = new TUIRoomEngine();
|
|
2178
|
+
* // 修改房间内用户名称
|
|
2179
|
+
* await roomEngine.changeUserNameCard({
|
|
2180
|
+
* userId: 'user_1234',
|
|
2181
|
+
* nameCard: 'jack',
|
|
2182
|
+
* });
|
|
2183
|
+
*
|
|
2184
|
+
*/
|
|
2185
|
+
changeUserNameCard(options: {
|
|
2186
|
+
userId: string;
|
|
2187
|
+
nameCard: string;
|
|
2188
|
+
}): Promise<void>;
|
|
1775
2189
|
/**
|
|
1776
2190
|
* 将用户踢出房间,仅主持人和管理员可调用该接口
|
|
1777
2191
|
* @param {object} options
|
|
@@ -2260,16 +2674,27 @@ declare class TUIRoomEngine {
|
|
|
2260
2674
|
* @returns {TUIRoomDeviceManager} deviceManager
|
|
2261
2675
|
*/
|
|
2262
2676
|
getMediaDeviceManager(): TUIRoomDeviceManager;
|
|
2677
|
+
/**
|
|
2678
|
+
* v2.5.0 版本起支持使用 getConferenceListManager 获取 conferenceListManager 模块
|
|
2679
|
+
* @since v2.5.0
|
|
2680
|
+
*
|
|
2681
|
+
* @example
|
|
2682
|
+
* // 获取会议列表
|
|
2683
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
2684
|
+
*
|
|
2685
|
+
* @returns {TUIConferenceListManager} conferenceListManager
|
|
2686
|
+
*/
|
|
2687
|
+
getConferenceListManager(): TUIConferenceListManager;
|
|
2263
2688
|
/**
|
|
2264
2689
|
* 获取 trtcCloud 实例
|
|
2265
2690
|
* @returns {TRTCCloud} trtcCloud
|
|
2266
|
-
* web 端 trtcCloud 能力请查看:https://web.sdk.qcloud.com/trtc/webrtc/trtcCloud/doc/
|
|
2691
|
+
* web 端 trtcCloud 能力请查看:https://web.sdk.qcloud.com/trtc/webrtc/trtcCloud/doc/this.trtcCloud.html
|
|
2267
2692
|
*
|
|
2268
2693
|
* @example
|
|
2269
2694
|
* const roomEngine = new TUIRoomEngine();
|
|
2270
2695
|
* const trtcCloud = roomEngine.getTRTCCloud();
|
|
2271
2696
|
*/
|
|
2272
|
-
getTRTCCloud():
|
|
2697
|
+
getTRTCCloud(): any;
|
|
2273
2698
|
/**
|
|
2274
2699
|
* 获取 tim 实例
|
|
2275
2700
|
* @returns {TIM} tim
|
|
@@ -2291,4 +2716,4 @@ declare class TUIRoomEngine {
|
|
|
2291
2716
|
private static handleSetFramework;
|
|
2292
2717
|
}
|
|
2293
2718
|
|
|
2294
|
-
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, type TUIDeviceInfo, TUIErrorCode, TUIKickedOutOfRoomReason, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode,
|
|
2719
|
+
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, TUIKickedOutOfRoomReason, type TUILoginUserInfo, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, type TUIMessage, type TUINetwork, TUINetworkQuality, type TUIRequest, TUIRequestAction, type TUIRequestCallback, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, type TUIRoomInfo, TUIRoomType, type TUISeatInfo, type TUISeatLockParams, TUISeatMode, type TUIUserInfo, type TUIVideoEncoderParams, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
|