@tencentcloud/tuiroom-engine-js 2.4.2-beta.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 +462 -37
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ChatSDK } from '@tencentcloud/chat';
|
|
2
2
|
export { default as TIM, default as TencentCloudChat } from '@tencentcloud/chat';
|
|
3
|
-
import { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-cloud-js-sdk';
|
|
3
|
+
import TRTCCloud, { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-cloud-js-sdk';
|
|
4
4
|
export { Rect, default as TRTCCloud, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo } from 'trtc-cloud-js-sdk';
|
|
5
5
|
|
|
6
6
|
declare enum TUIErrorCode {
|
|
@@ -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'
|
|
@@ -514,9 +528,24 @@ declare enum TUIRoomEvents {
|
|
|
514
528
|
* });
|
|
515
529
|
*/
|
|
516
530
|
onRemoteUserLeaveRoom = "onRemoteUserLeaveRoom",
|
|
531
|
+
/**
|
|
532
|
+
* @since v2.5.0
|
|
533
|
+
* @description 房间内用户信息改变事件
|
|
534
|
+
* @default 'onUserInfoChanged'
|
|
535
|
+
* @event TUIRoomEvents#onUserInfoChanged
|
|
536
|
+
* @param {object} options
|
|
537
|
+
* @param {TUIUserInfo} options.userInfo 用户信息
|
|
538
|
+
* @example
|
|
539
|
+
* const roomEngine = new TUIRoomEngine();
|
|
540
|
+
* roomEngine.on(TUIRoomEvents.onUserInfoChanged, ({ userInfo }) => {
|
|
541
|
+
* console.log('roomEngine.onUserInfoChanged', userInfo);
|
|
542
|
+
* });
|
|
543
|
+
*/
|
|
544
|
+
onUserInfoChanged = "onUserInfoChanged",
|
|
517
545
|
/**
|
|
518
546
|
* @description 用户角色改变事件
|
|
519
|
-
* @
|
|
547
|
+
* @deprecated 该接口自 v2.5.0 版本废弃,请使用'onUserInfoChanged'.
|
|
548
|
+
* @default 'onUserRoleChanged'
|
|
520
549
|
* @event TUIRoomEvents#onUserRoleChanged
|
|
521
550
|
* @param {object} options
|
|
522
551
|
* @param {string} options.userId 用户Id
|
|
@@ -780,6 +809,104 @@ declare enum TUIRoomDeviceMangerEvents {
|
|
|
780
809
|
* });
|
|
781
810
|
*/
|
|
782
811
|
onTestSpeakerVolume = "onTestSpeakerVolume"
|
|
812
|
+
}
|
|
813
|
+
/**
|
|
814
|
+
* @since v2.5.0
|
|
815
|
+
* **TUIConferenceListManager 事件列表**<br>
|
|
816
|
+
* @namespace TUIConferenceListManagerEvents
|
|
817
|
+
*/
|
|
818
|
+
declare enum TUIConferenceListManagerEvents {
|
|
819
|
+
/**
|
|
820
|
+
* @description 会议预定回调
|
|
821
|
+
* @default 'onConferenceScheduled'
|
|
822
|
+
* @event TUIConferenceListManagerEvents#onConferenceScheduled
|
|
823
|
+
* @param {object} options
|
|
824
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
825
|
+
*
|
|
826
|
+
* @example
|
|
827
|
+
* const roomEngine = new TUIRoomEngine();
|
|
828
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
829
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceScheduled, ({ conferenceInfo }) => {
|
|
830
|
+
* console.log('conferenceListManager.onConferenceScheduled', conferenceInfo);
|
|
831
|
+
* })
|
|
832
|
+
*/
|
|
833
|
+
onConferenceScheduled = "onConferenceScheduled",
|
|
834
|
+
/**
|
|
835
|
+
* @description 会议即将开始回调
|
|
836
|
+
* @default 'onConferenceWillStart'
|
|
837
|
+
* @event TUIConferenceListManagerEvents#onConferenceWillStart
|
|
838
|
+
* @param {object} options
|
|
839
|
+
* @param {string} options.conferenceInfo 会议信息。
|
|
840
|
+
*
|
|
841
|
+
* @example
|
|
842
|
+
* const roomEngine = new TUIRoomEngine();
|
|
843
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
844
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceWillStart, ({ conferenceInfo }) => {
|
|
845
|
+
* console.log('conferenceListManager.onConferenceWillStart', conferenceInfo);
|
|
846
|
+
* })
|
|
847
|
+
*/
|
|
848
|
+
onConferenceWillStart = "onConferenceWillStart",
|
|
849
|
+
/**
|
|
850
|
+
* @description 会议取消回调
|
|
851
|
+
*
|
|
852
|
+
* @param {object} options
|
|
853
|
+
* @param {string} options.roomId 会议Id,即房间 roomId 。
|
|
854
|
+
* @param {TUIConferenceCancelReason} options.reason 会议取消原因。
|
|
855
|
+
* @param {TUIUserInfo} options.operateUser 取消会议操作者信息。
|
|
856
|
+
*
|
|
857
|
+
* @example
|
|
858
|
+
* const roomEngine = new TUIRoomEngine();
|
|
859
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
860
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceCancelled, ({ roomId, reason, operateUser }) => {
|
|
861
|
+
* console.log('conferenceListManager.onConferenceCancelled', roomId, reason, operateUser);
|
|
862
|
+
* })
|
|
863
|
+
*/
|
|
864
|
+
onConferenceCancelled = "onConferenceCancelled",
|
|
865
|
+
/**
|
|
866
|
+
* @description 会议信息变更回调
|
|
867
|
+
*
|
|
868
|
+
* @param {object} options
|
|
869
|
+
* @param {TUIConferenceModifyInfo} options.conferenceModifyInfo 会议信息。
|
|
870
|
+
*
|
|
871
|
+
* @example
|
|
872
|
+
* const roomEngine = new TUIRoomEngine();
|
|
873
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
874
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceInfoChanged, ({ conferenceModifyInfo }) => {
|
|
875
|
+
* console.log('conferenceListManager.onConferenceInfoChanged', conferenceModifyInfo);
|
|
876
|
+
* })
|
|
877
|
+
*/
|
|
878
|
+
onConferenceInfoChanged = "onConferenceInfoChanged",
|
|
879
|
+
/**
|
|
880
|
+
* @description 参会人员变更回调
|
|
881
|
+
*
|
|
882
|
+
* @param {object} options
|
|
883
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
884
|
+
* @param {Array<TUIUserInfo>} options.leftUsers 离开成员列表。
|
|
885
|
+
* @param {Array<TUIUserInfo>} options.joinedUsers 新加入成员列表。
|
|
886
|
+
*
|
|
887
|
+
* @example
|
|
888
|
+
* const roomEngine = new TUIRoomEngine();
|
|
889
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
890
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onScheduleAttendeesChanged, ({ roomId, leftUsers, joinedUsers }) => {
|
|
891
|
+
* console.log('conferenceListManager.onScheduleAttendeesChanged', roomId, leftUsers, joinedUsers);
|
|
892
|
+
* })
|
|
893
|
+
*/
|
|
894
|
+
onScheduleAttendeesChanged = "onScheduleAttendeesChanged",
|
|
895
|
+
/**
|
|
896
|
+
* @description 会议状态变更回调
|
|
897
|
+
*
|
|
898
|
+
* @param {object} options
|
|
899
|
+
* @param {string} options.roomId 会议Id,即房间roomId。
|
|
900
|
+
* @param {TUIConferenceStatus} options.status 会议状态。
|
|
901
|
+
*
|
|
902
|
+
* @example
|
|
903
|
+
* const roomEngine = new TUIRoomEngine();
|
|
904
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
905
|
+
* conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceStatusChanged, ({ roomId, status }) => {
|
|
906
|
+
* console.log('conferenceListManager.onConferenceStatusChanged', roomId, status );
|
|
907
|
+
* })
|
|
908
|
+
*/
|
|
909
|
+
onConferenceStatusChanged = "onConferenceStatusChanged"
|
|
783
910
|
}
|
|
784
911
|
|
|
785
912
|
declare class Logger {
|
|
@@ -811,9 +938,11 @@ declare class TUIRoomDeviceManager {
|
|
|
811
938
|
private deviceManagerWASM;
|
|
812
939
|
private logger;
|
|
813
940
|
private static deviceManager;
|
|
941
|
+
private trtcCloud;
|
|
814
942
|
constructor(options: {
|
|
815
943
|
Module: any;
|
|
816
944
|
logger: Logger;
|
|
945
|
+
trtcCloud: TRTCCloud;
|
|
817
946
|
});
|
|
818
947
|
setDeviceManagerWASM(deviceManagerWASM: any): void;
|
|
819
948
|
/**
|
|
@@ -960,6 +1089,248 @@ declare class TUIRoomDeviceManager {
|
|
|
960
1089
|
off(event: string, func: (...args: any[]) => void): void;
|
|
961
1090
|
}
|
|
962
1091
|
|
|
1092
|
+
/**
|
|
1093
|
+
* 会议列表
|
|
1094
|
+
* @class conferenceListManager
|
|
1095
|
+
*/
|
|
1096
|
+
declare class TUIConferenceListManager {
|
|
1097
|
+
private static readonly ROOM_NAME;
|
|
1098
|
+
private static readonly SCHEDULED_START_TIME;
|
|
1099
|
+
private static readonly SCHEDULED_END_TIME;
|
|
1100
|
+
private conferenceListManagerWASM;
|
|
1101
|
+
private logger;
|
|
1102
|
+
private static conferenceListManager;
|
|
1103
|
+
constructor(options: {
|
|
1104
|
+
Module: any;
|
|
1105
|
+
logger: Logger;
|
|
1106
|
+
});
|
|
1107
|
+
setConferenceListManagerWASM(conferenceListManager: any): void;
|
|
1108
|
+
/**
|
|
1109
|
+
* @private
|
|
1110
|
+
* 调用 TUIRoomEngineWASM 的异步方法
|
|
1111
|
+
* @param funcName
|
|
1112
|
+
* @param args
|
|
1113
|
+
*/
|
|
1114
|
+
private JSCallNativeFunctionPromise;
|
|
1115
|
+
/**
|
|
1116
|
+
* 预定会议
|
|
1117
|
+
* @param {object} options
|
|
1118
|
+
* @param {string} options.roomId 房间 Id,必填, roomId 限制长度为64字节,且仅支持以下范围的字符集:<br>
|
|
1119
|
+
* - 大小写英文字母(a-zA-Z)
|
|
1120
|
+
* - 数字(0-9)
|
|
1121
|
+
* - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
|
|
1122
|
+
* @param {number} [options.scheduleStartTime] 预定会议开始时间(计数单位为秒的时间戳)
|
|
1123
|
+
* @param {number} [options.scheduleEndTime] 预定会议结束时间(计数单位为秒的时间戳)
|
|
1124
|
+
* @param {array=} [options.scheduleAttendees=[]] 预定会议邀请成员 userId 列表
|
|
1125
|
+
* @param {number=} [options.reminderSecondsBeforeStart=0] 会议开始前提醒时间,单位秒
|
|
1126
|
+
* @param {string=} [options.roomName=roomId] 房间名称,默认值为 roomId,传入的值不能为空字符串
|
|
1127
|
+
* @param {TUIRoomType=} [options.roomType=TUIRoomType.kConference] 房间类型, 默认值为 TUIRoomType.kConference <br>
|
|
1128
|
+
* 办公协同、医疗问诊、远程会议、教育场景,roomType 设置为 TUIRoomType.kConference
|
|
1129
|
+
* 电商直播、语聊房场景,roomType 设置为 TUIRoomType.kLive
|
|
1130
|
+
* @param {boolean=} [options.isSeatEnabled=false] 是否开启麦位控制,默认值为 false
|
|
1131
|
+
* @param {TUISeatMode=} [options.seatMode=TUISeatMode.kFreeToTake] 上麦模式(开启麦位控制后生效),默认值为 TUISeatMode.kFreeToTake <br>
|
|
1132
|
+
* 自由上麦模式,台下观众可以自由上麦,无需申请,seatMode 设置为 TUISeatMode.kFreeToTake
|
|
1133
|
+
* 申请上麦模式,台下观众上麦需要房主或者管理员同意后才能上麦,seatMode 设置为 TUISeatMode.kApplyToTake
|
|
1134
|
+
* @param {boolean=} [options.isMicrophoneDisableForAllUser=false] 是否开启全员禁麦,默认不开启全员禁麦(创建房间可选参数)
|
|
1135
|
+
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1136
|
+
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1137
|
+
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1138
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1139
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持)
|
|
1140
|
+
* @returns {Promise<void>}
|
|
1141
|
+
*
|
|
1142
|
+
* @example
|
|
1143
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1144
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1145
|
+
* await conferenceListManager.scheduleConference({
|
|
1146
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1147
|
+
* scheduleStartTime: 1720004257, // 填入您的会议预定开始时间的时间戳,单位秒。
|
|
1148
|
+
* scheduleEndTime: 1720001317, // 填入您的会议预定结束时间的时间戳,单位秒。
|
|
1149
|
+
* });
|
|
1150
|
+
*/
|
|
1151
|
+
scheduleConference(options: {
|
|
1152
|
+
scheduleStartTime: number;
|
|
1153
|
+
scheduleEndTime: number;
|
|
1154
|
+
scheduleAttendees?: string[];
|
|
1155
|
+
reminderSecondsBeforeStart?: number;
|
|
1156
|
+
roomId: string;
|
|
1157
|
+
roomName?: string;
|
|
1158
|
+
roomType?: TUIRoomType;
|
|
1159
|
+
isSeatEnabled?: boolean;
|
|
1160
|
+
seatMode?: TUISeatMode;
|
|
1161
|
+
isMicrophoneDisableForAllUser?: boolean;
|
|
1162
|
+
isScreenShareDisableForAllUser?: boolean;
|
|
1163
|
+
isCameraDisableForAllUser?: boolean;
|
|
1164
|
+
isMessageDisableForAllUser?: boolean;
|
|
1165
|
+
maxSeatCount?: number;
|
|
1166
|
+
password?: string;
|
|
1167
|
+
}): Promise<void>;
|
|
1168
|
+
/**
|
|
1169
|
+
* 取消预定会议
|
|
1170
|
+
*
|
|
1171
|
+
* @param {object} options
|
|
1172
|
+
* @param {string} options.roomId 要取消会议Id,即房间roomId。
|
|
1173
|
+
* @returns {Promise<void>}
|
|
1174
|
+
*
|
|
1175
|
+
* @example
|
|
1176
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1177
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1178
|
+
* await conferenceListManager.cancelConference({
|
|
1179
|
+
* roomId: '12345', // 填入您要取消的会议 Id ,即房间 roomId 。
|
|
1180
|
+
* });
|
|
1181
|
+
*/
|
|
1182
|
+
cancelConference(options: {
|
|
1183
|
+
roomId: string;
|
|
1184
|
+
}): Promise<void>;
|
|
1185
|
+
/**
|
|
1186
|
+
* 更新预定会议信息
|
|
1187
|
+
*
|
|
1188
|
+
* @param {object} options
|
|
1189
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1190
|
+
* @param {string} options.roomName 会议的名称。
|
|
1191
|
+
* @param {string} options.scheduleStartTime 预定会议的开始时间(计数单位为秒的时间戳)。
|
|
1192
|
+
* @param {string} options.scheduleEndTime 预定会议的结束时间(计数单位为秒的时间戳)。
|
|
1193
|
+
* @returns {Promise<void>}
|
|
1194
|
+
*
|
|
1195
|
+
* @example
|
|
1196
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1197
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1198
|
+
* await conferenceListManager.updateConferenceInfo({
|
|
1199
|
+
* roomId: '12345', // 填入您要更新的会议房间 roomId 。
|
|
1200
|
+
* roomName: 'myRoomName', // 填入您更新后的会议名称。
|
|
1201
|
+
* scheduleStartTime: 1720004257, // 填入您更新后的会议预定开始时间的时间戳,单位秒。
|
|
1202
|
+
* scheduleEndTime: 1720001317, // 填入您更新后的会议预定结束时间的时间戳,单位秒。
|
|
1203
|
+
* });
|
|
1204
|
+
*/
|
|
1205
|
+
updateConferenceInfo(options: {
|
|
1206
|
+
roomId: string;
|
|
1207
|
+
roomName?: string;
|
|
1208
|
+
scheduleStartTime?: number;
|
|
1209
|
+
scheduleEndTime?: number;
|
|
1210
|
+
}): Promise<void>;
|
|
1211
|
+
/**
|
|
1212
|
+
* 获取预定会议列表
|
|
1213
|
+
*
|
|
1214
|
+
* @param {object} options
|
|
1215
|
+
* @param {object} options.statusArray 会议状态数组,默认值为拉取全部状态会议。
|
|
1216
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 '',回调成功 如果callback返回的数据中 cursor 不为 '',表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的cursor为 '',表示数据已经全部拉取。
|
|
1217
|
+
* @param {string} options.count 本次拉取数量。
|
|
1218
|
+
*
|
|
1219
|
+
* @example
|
|
1220
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1221
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1222
|
+
* const conferenceList = [];
|
|
1223
|
+
* let result;
|
|
1224
|
+
* let cursor = '';
|
|
1225
|
+
* let count = 20;
|
|
1226
|
+
* do {
|
|
1227
|
+
* result = await conferenceListManager.fetchScheduledConferenceList({ cursor, count });
|
|
1228
|
+
* conferenceList.push(...result.conferenceList);
|
|
1229
|
+
* cursor = result.cursor;
|
|
1230
|
+
* } while (cursor !== '')
|
|
1231
|
+
*/
|
|
1232
|
+
fetchScheduledConferenceList(options: {
|
|
1233
|
+
statusArray?: TUIConferenceStatus[];
|
|
1234
|
+
cursor: string;
|
|
1235
|
+
count: number;
|
|
1236
|
+
}): Promise<Array<TUIConferenceInfo>>;
|
|
1237
|
+
/**
|
|
1238
|
+
* 获取预定会议邀请成员列表
|
|
1239
|
+
*
|
|
1240
|
+
* @param {object} options
|
|
1241
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1242
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1243
|
+
* @param {string} options.count 本次拉取数量。
|
|
1244
|
+
*
|
|
1245
|
+
* @example
|
|
1246
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1247
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1248
|
+
* const attendeeList = [];
|
|
1249
|
+
* let result;
|
|
1250
|
+
* let cursor = '';
|
|
1251
|
+
* let totalCount = 0;
|
|
1252
|
+
* let roomId = '12345';
|
|
1253
|
+
* let count = 20;
|
|
1254
|
+
* do {
|
|
1255
|
+
* result = await conferenceListManager.fetchAttendeeList({ roomId, cursor, count });
|
|
1256
|
+
* attendeeList.push(...result.attendeeList);
|
|
1257
|
+
* cursor = result.cursor;
|
|
1258
|
+
* totalCount = result.totalCount;
|
|
1259
|
+
* } while (cursor !== '')
|
|
1260
|
+
*/
|
|
1261
|
+
fetchAttendeeList(options: {
|
|
1262
|
+
roomId: string;
|
|
1263
|
+
cursor: string;
|
|
1264
|
+
count: number;
|
|
1265
|
+
}): Promise<Array<TUIUserInfo>>;
|
|
1266
|
+
/**
|
|
1267
|
+
* 添加成员至邀请列表
|
|
1268
|
+
*
|
|
1269
|
+
* @param {object} options
|
|
1270
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1271
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1272
|
+
* @returns {Promise<void>}
|
|
1273
|
+
*
|
|
1274
|
+
* @example
|
|
1275
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1276
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1277
|
+
* await conferenceListManager.addAttendeesByAdmin({
|
|
1278
|
+
* roomId: '12345', // 填入您要添加成员的会议 Id ,即房间 roomId 。
|
|
1279
|
+
* userIdList: ['123'], // 填入您要邀请的成员 Id 数组。
|
|
1280
|
+
* });
|
|
1281
|
+
*/
|
|
1282
|
+
addAttendeesByAdmin(options: {
|
|
1283
|
+
roomId: string;
|
|
1284
|
+
userIdList: string[];
|
|
1285
|
+
}): Promise<void>;
|
|
1286
|
+
/**
|
|
1287
|
+
* 从邀请列表移除成员
|
|
1288
|
+
*
|
|
1289
|
+
* @param {object} options
|
|
1290
|
+
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1291
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1292
|
+
* @returns {Promise<void>}
|
|
1293
|
+
*
|
|
1294
|
+
* @example
|
|
1295
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1296
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1297
|
+
* await conferenceListManager.removeAttendeesByAdmin({
|
|
1298
|
+
* roomId: '12345', // 填入您要移除成员的会议 Id ,即房间 roomId 。
|
|
1299
|
+
* userIdList: ['123'], // 填入您要移除的成员 Id 数组。
|
|
1300
|
+
* });
|
|
1301
|
+
*/
|
|
1302
|
+
removeAttendeesByAdmin(options: {
|
|
1303
|
+
roomId: string;
|
|
1304
|
+
userIdList: string[];
|
|
1305
|
+
}): Promise<void>;
|
|
1306
|
+
/**
|
|
1307
|
+
* 监听 conferenceListManager 的事件
|
|
1308
|
+
* @param event TUIConferenceListManagerEvents
|
|
1309
|
+
* @param func function
|
|
1310
|
+
* @returns {void}
|
|
1311
|
+
*
|
|
1312
|
+
* @example
|
|
1313
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1314
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1315
|
+
* conferenceListManager.on(event, func);
|
|
1316
|
+
*/
|
|
1317
|
+
on(event: TUIConferenceListManagerEvents, func: (...args: any[]) => void): void;
|
|
1318
|
+
private setObserver;
|
|
1319
|
+
private handleConferenceChangedEvent;
|
|
1320
|
+
/**
|
|
1321
|
+
* 取消监听 ConferenceListManager 的事件
|
|
1322
|
+
* @param event TUIConferenceListManagerEvents
|
|
1323
|
+
* @param func function
|
|
1324
|
+
* @returns {void}
|
|
1325
|
+
*
|
|
1326
|
+
* @example
|
|
1327
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1328
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
1329
|
+
* conferenceListManager.off(event, func);
|
|
1330
|
+
*/
|
|
1331
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1332
|
+
}
|
|
1333
|
+
|
|
963
1334
|
/**
|
|
964
1335
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
965
1336
|
*
|
|
@@ -969,18 +1340,25 @@ declare class TUIRoomEngine {
|
|
|
969
1340
|
static className: string;
|
|
970
1341
|
private static isReady;
|
|
971
1342
|
private roomEngineWASM;
|
|
1343
|
+
private trtcCloud;
|
|
972
1344
|
private deviceManager;
|
|
973
1345
|
private deviceManagerWASM;
|
|
1346
|
+
private conferenceListManager;
|
|
1347
|
+
private conferenceListManagerWASM;
|
|
974
1348
|
private static userId;
|
|
975
1349
|
private static sdkAppId;
|
|
976
1350
|
private static Module;
|
|
1351
|
+
private static shareInstance;
|
|
977
1352
|
private logger;
|
|
978
1353
|
private roomId;
|
|
979
1354
|
private localVideoQuality;
|
|
980
1355
|
private localAudioQuality;
|
|
981
1356
|
static setModule(Module: any): void;
|
|
982
1357
|
static once(event: string, func: (...args: any[]) => void): void;
|
|
983
|
-
|
|
1358
|
+
static getInstance(): TUIRoomEngine;
|
|
1359
|
+
constructor(options?: {
|
|
1360
|
+
isSharedInstance?: boolean;
|
|
1361
|
+
});
|
|
984
1362
|
/**
|
|
985
1363
|
* @private
|
|
986
1364
|
* 调用 TUIRoomEngineWASM 的静态方法
|
|
@@ -1088,7 +1466,8 @@ declare class TUIRoomEngine {
|
|
|
1088
1466
|
* @param {boolean=} [options.isScreenShareDisableForAllUser=false] 是否开启禁止屏幕分享,默认不开启禁止屏幕分享权限(该属性自 v2.2.0 版本 以后支持,创建房间可选参数)
|
|
1089
1467
|
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
1090
1468
|
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
1091
|
-
* @param {number=} options.maxSeatCount 最大麦位数量
|
|
1469
|
+
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
|
|
1470
|
+
* @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持) <br>
|
|
1092
1471
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
1093
1472
|
* roomType 为 TUIRoomType.kLive (直播场景) 时,maxSeatCount 最大限制为 16;
|
|
1094
1473
|
* @returns {Promise<void>}
|
|
@@ -1100,6 +1479,7 @@ declare class TUIRoomEngine {
|
|
|
1100
1479
|
* roomName: 'Test Room', // 填入您的房间名称, 房间名称默认为 roomId,最长 30 字节
|
|
1101
1480
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1102
1481
|
* isSeatEnabled: false, // 不开启麦位控制
|
|
1482
|
+
* password: '1234', // 填入您的房间密码,不填入则不设置房间密码
|
|
1103
1483
|
* });
|
|
1104
1484
|
*/
|
|
1105
1485
|
createRoom(options: {
|
|
@@ -1113,12 +1493,14 @@ declare class TUIRoomEngine {
|
|
|
1113
1493
|
isCameraDisableForAllUser?: boolean;
|
|
1114
1494
|
isMessageDisableForAllUser?: boolean;
|
|
1115
1495
|
maxSeatCount?: number;
|
|
1496
|
+
password?: string;
|
|
1116
1497
|
}): Promise<void>;
|
|
1117
1498
|
/**
|
|
1118
1499
|
* 进入房间接口
|
|
1119
1500
|
* @param {object} options
|
|
1120
1501
|
* @param {string} options.roomId 房间号,字符串类型
|
|
1121
1502
|
* @param {TUIRoomType} options.roomType 房间类型, 默认值为 TUIRoomType.kConference (自 v2.3.0 支持)
|
|
1503
|
+
* @param {TUIEnterRoomOptions} options.options 进入房间的可选参数 (自 v2.5.0 支持)
|
|
1122
1504
|
* @returns {Promise<TUIRoomInfo>} roomInfo
|
|
1123
1505
|
* 该接口返回当前房间信息
|
|
1124
1506
|
*
|
|
@@ -1127,11 +1509,15 @@ declare class TUIRoomEngine {
|
|
|
1127
1509
|
* const roomDetailInfo = await roomEngine.enterRoom({
|
|
1128
1510
|
* roomId: '12345',
|
|
1129
1511
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
1512
|
+
* options: {
|
|
1513
|
+
* password: '1234',
|
|
1514
|
+
* }
|
|
1130
1515
|
* });
|
|
1131
1516
|
*/
|
|
1132
1517
|
enterRoom(options: {
|
|
1133
1518
|
roomId: string;
|
|
1134
1519
|
roomType: TUIRoomType;
|
|
1520
|
+
options?: TUIEnterRoomOptions;
|
|
1135
1521
|
}): Promise<TUIRoomInfo>;
|
|
1136
1522
|
/**
|
|
1137
1523
|
* 解散房间接口,解散房间必须由房间所有者发起,解散房间之后房间不可进入
|
|
@@ -1174,16 +1560,6 @@ declare class TUIRoomEngine {
|
|
|
1174
1560
|
updateRoomNameByAdmin(options: {
|
|
1175
1561
|
roomName: string;
|
|
1176
1562
|
}): Promise<void>;
|
|
1177
|
-
/**
|
|
1178
|
-
* 更新房间的发言模式(仅群主或者管理员可以调用)
|
|
1179
|
-
* @deprecated 该接口自 v2.0.0 版本废弃
|
|
1180
|
-
* @param {object} options
|
|
1181
|
-
* @param {TUISpeechMode} options.speechMode 发言类型
|
|
1182
|
-
* @returns {Promise<void>}
|
|
1183
|
-
*/
|
|
1184
|
-
updateRoomSpeechModeByAdmin(options: {
|
|
1185
|
-
speechMode: TUISpeechMode;
|
|
1186
|
-
}): Promise<void>;
|
|
1187
1563
|
/**
|
|
1188
1564
|
* 更新房间上麦模式(仅群主或者管理员可以调用)
|
|
1189
1565
|
* 房间上麦模式更新后,roomEngine 会通过 TUIRoomEvents.onRoomSeatModeChanged 回调通知房间内用户
|
|
@@ -1201,6 +1577,23 @@ declare class TUIRoomEngine {
|
|
|
1201
1577
|
updateRoomSeatModeByAdmin(options: {
|
|
1202
1578
|
seatMode: TUISeatMode;
|
|
1203
1579
|
}): Promise<void>;
|
|
1580
|
+
/**
|
|
1581
|
+
* 更新房间密码(仅群主或者管理员可以调用)
|
|
1582
|
+
*
|
|
1583
|
+
* @since v2.5.0
|
|
1584
|
+
* @param {object} options
|
|
1585
|
+
* @param {string} options.password 房间密码
|
|
1586
|
+
* @returns {Promise<void>}
|
|
1587
|
+
*
|
|
1588
|
+
* @example
|
|
1589
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1590
|
+
* await roomEngine.updateRoomPasswordByAdmin({
|
|
1591
|
+
* password: '1234', // 更新密码为 1234
|
|
1592
|
+
* });
|
|
1593
|
+
*/
|
|
1594
|
+
updateRoomPasswordByAdmin(options: {
|
|
1595
|
+
password: string;
|
|
1596
|
+
}): Promise<void>;
|
|
1204
1597
|
/**
|
|
1205
1598
|
* 获取当前房间用户列表,注意该接口一次拉取的用户列表量最大为 50 个
|
|
1206
1599
|
*
|
|
@@ -1783,6 +2176,27 @@ declare class TUIRoomEngine {
|
|
|
1783
2176
|
userId: string;
|
|
1784
2177
|
userRole: TUIRole;
|
|
1785
2178
|
}): Promise<void>;
|
|
2179
|
+
/**
|
|
2180
|
+
* 修改房间内用户名称
|
|
2181
|
+
* @since v2.5.0
|
|
2182
|
+
* @param {object} options 修改房间内用户名称,普通成员可修改自己的,管理员可修改自己和普通成员的。
|
|
2183
|
+
* @param {string} options.userId 用户 Id
|
|
2184
|
+
* @param {string} options.nameCard 房间内用户名称
|
|
2185
|
+
* @returns {Promise<void>}
|
|
2186
|
+
*
|
|
2187
|
+
* @example
|
|
2188
|
+
* const roomEngine = new TUIRoomEngine();
|
|
2189
|
+
* // 修改房间内用户名称
|
|
2190
|
+
* await roomEngine.changeUserNameCard({
|
|
2191
|
+
* userId: 'user_1234',
|
|
2192
|
+
* nameCard: 'jack',
|
|
2193
|
+
* });
|
|
2194
|
+
*
|
|
2195
|
+
*/
|
|
2196
|
+
changeUserNameCard(options: {
|
|
2197
|
+
userId: string;
|
|
2198
|
+
nameCard: string;
|
|
2199
|
+
}): Promise<void>;
|
|
1786
2200
|
/**
|
|
1787
2201
|
* 将用户踢出房间,仅主持人和管理员可调用该接口
|
|
1788
2202
|
* @param {object} options
|
|
@@ -2285,6 +2699,17 @@ declare class TUIRoomEngine {
|
|
|
2285
2699
|
*/
|
|
2286
2700
|
getMediaDeviceManager(): TUIRoomDeviceManager;
|
|
2287
2701
|
private handleDeviceManagerWASM;
|
|
2702
|
+
/**
|
|
2703
|
+
* v2.5.0 版本起支持使用 getConferenceListManager 获取 conferenceListManager 模块
|
|
2704
|
+
* @since v2.5.0
|
|
2705
|
+
*
|
|
2706
|
+
* @example
|
|
2707
|
+
* // 获取会议列表
|
|
2708
|
+
* const conferenceListManager = roomEngine.getConferenceListManager();
|
|
2709
|
+
*
|
|
2710
|
+
* @returns {TUIConferenceListManager} conferenceListManager
|
|
2711
|
+
*/
|
|
2712
|
+
getConferenceListManager(): TUIConferenceListManager;
|
|
2288
2713
|
/**
|
|
2289
2714
|
* 获取 trtcCloud 实例
|
|
2290
2715
|
* @returns {TRTCCloud} trtcCloud
|
|
@@ -2294,7 +2719,7 @@ declare class TUIRoomEngine {
|
|
|
2294
2719
|
* const roomEngine = new TUIRoomEngine();
|
|
2295
2720
|
* const trtcCloud = roomEngine.getTRTCCloud();
|
|
2296
2721
|
*/
|
|
2297
|
-
getTRTCCloud():
|
|
2722
|
+
getTRTCCloud(): TRTCCloud;
|
|
2298
2723
|
/**
|
|
2299
2724
|
* 获取 tim 实例
|
|
2300
2725
|
* @returns {TIM} tim
|
|
@@ -2302,7 +2727,7 @@ declare class TUIRoomEngine {
|
|
|
2302
2727
|
*
|
|
2303
2728
|
* @example
|
|
2304
2729
|
* const roomEngine = new TUIRoomEngine();
|
|
2305
|
-
* const
|
|
2730
|
+
* const tim = roomEngine.getTIM();
|
|
2306
2731
|
*/
|
|
2307
2732
|
getTIM(): ChatSDK;
|
|
2308
2733
|
destroy(): void;
|
|
@@ -2316,4 +2741,4 @@ declare class TUIRoomEngine {
|
|
|
2316
2741
|
private static handleSetFramework;
|
|
2317
2742
|
}
|
|
2318
2743
|
|
|
2319
|
-
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,
|
|
2744
|
+
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 };
|