@tencentcloud/tuiroom-engine-js 3.5.0-beta.3 → 3.5.1-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/index.d.ts CHANGED
@@ -287,6 +287,11 @@ type TUIUserInfo = {
287
287
  isMessageDisabled: boolean;
288
288
  roomCustomInfo: Record<string, any>;
289
289
  };
290
+ declare enum TUIUserInfoModifyFlag {
291
+ kNone = 0,
292
+ kUserRole = 1,
293
+ kNameCard = 2
294
+ }
290
295
  type TUISeatInfo = {
291
296
  index: number;
292
297
  userId: string;
@@ -311,6 +316,8 @@ type TUIRequest = {
311
316
  nameCard: string;
312
317
  avatarUrl: string;
313
318
  content: string;
319
+ fromUser: TUIUserInfo;
320
+ toUser: TUIUserInfo;
314
321
  };
315
322
  type TUIRequestCallback = {
316
323
  requestCallbackType: TUIRequestCallbackType;
@@ -618,10 +625,11 @@ declare enum TUIRoomEvents {
618
625
  * @event TUIRoomEvents#onUserInfoChanged
619
626
  * @param {object} options
620
627
  * @param {TUIUserInfo} options.userInfo 用户信息
628
+ * @param {TUIUserInfoModifyFlag} options.modifyFlag 用户信息变更标记位,该字段自 v3.5.1 开始支持
621
629
  * @example
622
630
  * const roomEngine = new TUIRoomEngine();
623
- * roomEngine.on(TUIRoomEvents.onUserInfoChanged, ({ userInfo }) => {
624
- * console.log('roomEngine.onUserInfoChanged', userInfo);
631
+ * roomEngine.on(TUIRoomEvents.onUserInfoChanged, ({ userInfo, modifyFlag }) => {
632
+ * console.log('roomEngine.onUserInfoChanged', userInfo, modifyFlag);
625
633
  * });
626
634
  */
627
635
  onUserInfoChanged = "onUserInfoChanged",
@@ -961,6 +969,7 @@ declare enum TUIConferenceListManagerEvents {
961
969
  onConferenceWillStart = "onConferenceWillStart",
962
970
  /**
963
971
  * @description 会议取消回调
972
+ * @deprecated 该接口自 v3.5.0 版本废弃,请使用 onConferenceDidCancelled'.
964
973
  *
965
974
  * @param {object} options
966
975
  * @param {string} options.roomId 会议Id,即房间 roomId 。
@@ -975,6 +984,22 @@ declare enum TUIConferenceListManagerEvents {
975
984
  * })
976
985
  */
977
986
  onConferenceCancelled = "onConferenceCancelled",
987
+ /**
988
+ * @description 会议取消回调 代替 onConferenceCancelled
989
+ *
990
+ * @param {object} options
991
+ * @param {TUIConferenceInfo} options.conferenceInfo 会议信息。
992
+ * @param {TUIConferenceCancelReason} options.reason 会议取消原因。
993
+ * @param {TUIUserInfo} options.operateUser 取消会议操作者信息。
994
+ *
995
+ * @example
996
+ * const roomEngine = new TUIRoomEngine();
997
+ * const conferenceListManager = roomEngine.getConferenceListManager();
998
+ * conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceDidCancelled, ({ conferenceInfo, reason, operateUser }) => {
999
+ * console.log('conferenceListManager.onConferenceDidCancelled', conferenceInfo, reason, operateUser);
1000
+ * })
1001
+ */
1002
+ onConferenceDidCancelled = "onConferenceDidCancelled",
978
1003
  /**
979
1004
  * @description 会议信息变更回调
980
1005
  *
@@ -991,6 +1016,7 @@ declare enum TUIConferenceListManagerEvents {
991
1016
  onConferenceInfoChanged = "onConferenceInfoChanged",
992
1017
  /**
993
1018
  * @description 参会人员变更回调
1019
+ * @deprecated 该接口自 v3.5.0 版本废弃,请使用 onScheduleAttendeesUpdated'.
994
1020
  *
995
1021
  * @param {object} options
996
1022
  * @param {string} options.roomId 会议Id,即房间roomId。
@@ -1005,8 +1031,25 @@ declare enum TUIConferenceListManagerEvents {
1005
1031
  * })
1006
1032
  */
1007
1033
  onScheduleAttendeesChanged = "onScheduleAttendeesChanged",
1034
+ /**
1035
+ * @description 参会人员变更回调 代替 onScheduleAttendeesChanged
1036
+ *
1037
+ * @param {object} options
1038
+ * @param {TUIConferenceInfo} options.conferenceInfo 会议信息。
1039
+ * @param {Array<TUIUserInfo>} options.leftUsers 离开成员列表。
1040
+ * @param {Array<TUIUserInfo>} options.joinedUsers 新加入成员列表。
1041
+ *
1042
+ * @example
1043
+ * const roomEngine = new TUIRoomEngine();
1044
+ * const conferenceListManager = roomEngine.getConferenceListManager();
1045
+ * conferenceListManager.on(TUIConferenceListManagerEvents.onScheduleAttendeesUpdated, ({ conferenceInfo, leftUsers, joinedUsers }) => {
1046
+ * console.log('conferenceListManager.onScheduleAttendeesUpdated', conferenceInfo, leftUsers, joinedUsers);
1047
+ * })
1048
+ */
1049
+ onScheduleAttendeesUpdated = "onScheduleAttendeesUpdated",
1008
1050
  /**
1009
1051
  * @description 会议状态变更回调
1052
+ * @deprecated 该接口自 v3.5.0 版本废弃,请使用 onConferenceStatusUpdated'.
1010
1053
  *
1011
1054
  * @param {object} options
1012
1055
  * @param {string} options.roomId 会议Id,即房间roomId。
@@ -1019,7 +1062,22 @@ declare enum TUIConferenceListManagerEvents {
1019
1062
  * console.log('conferenceListManager.onConferenceStatusChanged', roomId, status );
1020
1063
  * })
1021
1064
  */
1022
- onConferenceStatusChanged = "onConferenceStatusChanged"
1065
+ onConferenceStatusChanged = "onConferenceStatusChanged",
1066
+ /**
1067
+ * @description 会议状态变更回调
1068
+ *
1069
+ * @param {object} options
1070
+ * @param {TUIConferenceInfo} options.conferenceInfo 会议Id,即房间roomId。
1071
+ * @param {TUIConferenceStatus} options.status 会议状态。
1072
+ *
1073
+ * @example
1074
+ * const roomEngine = new TUIRoomEngine();
1075
+ * const conferenceListManager = roomEngine.getConferenceListManager();
1076
+ * conferenceListManager.on(TUIConferenceListManagerEvents.onConferenceStatusUpdated, ({ conferenceInfo, status }) => {
1077
+ * console.log('conferenceListManager.onConferenceStatusUpdated', conferenceInfo, status );
1078
+ * })
1079
+ */
1080
+ onConferenceStatusUpdated = "onConferenceStatusUpdated"
1023
1081
  }
1024
1082
  /**
1025
1083
  * @since v2.6.0
@@ -1155,15 +1213,15 @@ declare enum TUIConferenceInvitationManagerEvents {
1155
1213
  * @default 'onInvitationAdded'
1156
1214
  * @event TUIConferenceInvitationManagerEvents#onInvitationAdded
1157
1215
  * @param {object} options
1158
- * @param {TUIRoomInfo} options.roomInfo 会议信息。
1216
+ * @param {string} options.roomId 会议信息。
1159
1217
  * @param {TUIInvitation} options.invitation 邀请信息。
1160
1218
  *
1161
1219
  *
1162
1220
  * @example
1163
1221
  * const roomEngine = new TUIRoomEngine();
1164
1222
  * const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
1165
- * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAdded, ({ roomInfo, invitation }) => {
1166
- * console.log('conferenceInvitationManager.onInvitationAdded', roomInfo, invitation);
1223
+ * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAdded, ({ roomId, invitation }) => {
1224
+ * console.log('conferenceInvitationManager.onInvitationAdded', roomId, invitation);
1167
1225
  * })
1168
1226
  */
1169
1227
  onInvitationAdded = "onInvitationAdded",
@@ -1172,15 +1230,15 @@ declare enum TUIConferenceInvitationManagerEvents {
1172
1230
  * @default 'onInvitationRemoved'
1173
1231
  * @event TUIConferenceInvitationManagerEvents#onInvitationRemoved
1174
1232
  * @param {object} options
1175
- * @param {TUIRoomInfo} options.roomInfo 会议信息。
1233
+ * @param {string} options.roomId 会议信息。
1176
1234
  * @param {TUIInvitation} options.invitation 邀请信息。
1177
1235
  *
1178
1236
  *
1179
1237
  * @example
1180
1238
  * const roomEngine = new TUIRoomEngine();
1181
1239
  * const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
1182
- * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRemoved, ({ roomInfo, invitation }) => {
1183
- * console.log('conferenceInvitationManager.onInvitationRemoved', roomInfo, invitation);
1240
+ * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRemoved, ({ roomId, invitation }) => {
1241
+ * console.log('conferenceInvitationManager.onInvitationRemoved', roomId, invitation);
1184
1242
  * })
1185
1243
  */
1186
1244
  onInvitationRemoved = "onInvitationRemoved",
@@ -1189,15 +1247,15 @@ declare enum TUIConferenceInvitationManagerEvents {
1189
1247
  * @default 'onInvitationStatusChanged'
1190
1248
  * @event TUIConferenceInvitationManagerEvents#onInvitationStatusChanged
1191
1249
  * @param {object} options
1192
- * @param {TUIRoomInfo} options.roomInfo 会议信息。
1250
+ * @param {string} options.roomId 会议信息。
1193
1251
  * @param {TUIInvitation} options.invitation 邀请信息。
1194
1252
  *
1195
1253
  *
1196
1254
  * @example
1197
1255
  * const roomEngine = new TUIRoomEngine();
1198
1256
  * const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
1199
- * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationStatusChanged, ({ roomInfo, invitation }) => {
1200
- * console.log('conferenceInvitationManager.onInvitationStatusChanged', roomInfo, invitation);
1257
+ * conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationStatusChanged, ({ roomId, invitation }) => {
1258
+ * console.log('conferenceInvitationManager.onInvitationStatusChanged', roomId, invitation);
1201
1259
  * })
1202
1260
  */
1203
1261
  onInvitationStatusChanged = "onInvitationStatusChanged"
@@ -1956,7 +2014,7 @@ declare class TUIRoomDeviceManager {
1956
2014
  * await roomEngine.startCameraDeviceTest({ view: 'test-preview' });
1957
2015
  */
1958
2016
  startCameraDeviceTest(options: {
1959
- view: string;
2017
+ view: string | HTMLDivElement;
1960
2018
  }): Promise<void>;
1961
2019
  /**
1962
2020
  * 停止摄像头测试
@@ -2164,7 +2222,10 @@ declare class TUIConferenceListManager {
2164
2222
  statusArray?: TUIConferenceStatus[];
2165
2223
  cursor: string;
2166
2224
  count: number;
2167
- }): Promise<Array<TUIConferenceInfo>>;
2225
+ }): Promise<{
2226
+ conferenceList: TUIConferenceInfo[];
2227
+ cursor: string;
2228
+ }>;
2168
2229
  /**
2169
2230
  * 获取预定会议邀请成员列表
2170
2231
  *
@@ -2193,7 +2254,11 @@ declare class TUIConferenceListManager {
2193
2254
  roomId: string;
2194
2255
  cursor: string;
2195
2256
  count: number;
2196
- }): Promise<Array<TUIUserInfo>>;
2257
+ }): Promise<{
2258
+ attendeeList: TUIUserInfo[];
2259
+ cursor: string;
2260
+ totalCount: number;
2261
+ }>;
2197
2262
  /**
2198
2263
  * 添加成员至邀请列表
2199
2264
  *
@@ -2292,7 +2357,7 @@ declare class TUIConferenceInvitationManager {
2292
2357
  * @param {string} options.userIdList 成员 userId 列表。
2293
2358
  * @param {number} options.timeout 超时时间。若 timeout 设置为 0s ,则无超时时间
2294
2359
  * @param {string} options.extensionInfo 自定义扩展信息
2295
- * @returns {Promise<void>}
2360
+ * @returns {Promise<Map<string, TUIInvitationCode>>}
2296
2361
  *
2297
2362
  * @example
2298
2363
  * const roomEngine = new TUIRoomEngine();
@@ -2308,7 +2373,7 @@ declare class TUIConferenceInvitationManager {
2308
2373
  userIdList: string[];
2309
2374
  timeout: number;
2310
2375
  extensionInfo?: string;
2311
- }): Promise<void>;
2376
+ }): Promise<Map<string, TUIInvitationCode>>;
2312
2377
  /**
2313
2378
  * 取消呼叫
2314
2379
  *
@@ -2395,7 +2460,10 @@ declare class TUIConferenceInvitationManager {
2395
2460
  roomId: string;
2396
2461
  cursor: string;
2397
2462
  count: number;
2398
- }): Promise<Array<TUIInvitation>>;
2463
+ }): Promise<{
2464
+ invitationList: TUIInvitation[];
2465
+ cursor: string;
2466
+ }>;
2399
2467
  /**
2400
2468
  * 监听 conferenceInvitationManager 的事件
2401
2469
  * @param event TUIConferenceListManagerEvents
@@ -4760,5 +4828,5 @@ declare class TUIRoomEngine {
4760
4828
  private static handleSetFramework;
4761
4829
  }
4762
4830
 
4763
- export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUIBattleCode, TUIBattleStoppedReason, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, TUIConferenceStatus, TUIConnectionCode, TUIDeviceStatus, TUIErrorCode, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, TUILiveBattleManagerEvents, TUILiveConnectionManagerEvents, TUILiveGiftManagerEvents, TUILiveLayoutManager, TUILiveLayoutManagerEvents, TUILiveListManager, TUILiveListManagerEvents, TUILiveModifyFlag, TUILiveStatisticsModifyFlag, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, TUIMoveSeatPolicy, TUINetworkQuality, TUIRenderMode, TUIRequestAction, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, TUIRoomType, TUISeatMode, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
4831
+ export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUIBattleCode, TUIBattleStoppedReason, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, TUIConferenceStatus, TUIConnectionCode, TUIDeviceStatus, TUIErrorCode, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, TUILiveBattleManagerEvents, TUILiveConnectionManagerEvents, TUILiveGiftManagerEvents, TUILiveLayoutManager, TUILiveLayoutManagerEvents, TUILiveListManager, TUILiveListManagerEvents, TUILiveModifyFlag, TUILiveStatisticsModifyFlag, TUIMediaDevice, TUIMediaDeviceState, TUIMediaDeviceType, TUIMoveSeatPolicy, TUINetworkQuality, TUIRenderMode, TUIRequestAction, TUIRequestCallbackType, TUIResolutionMode, TUIRole, TUIRoomDeviceManager, TUIRoomDeviceMangerEvents, TUIRoomDismissedReason, TUIRoomEvents, TUIRoomType, TUISeatMode, TUIUserInfoModifyFlag, TUIVideoQuality, TUIVideoStreamType, TUIRoomEngine as default };
4764
4832
  export type { GiftCategory, GiftInfo, StartLiveOptions, TUIAutoPlayCallbackInfo, TUIBattleConfig, TUIBattleInfo, TUIBattleUser, TUIConferenceInfo, TUIConferenceModifyInfo, TUIDeviceInfo, TUIEnterRoomOptions, TUIInvitation, TUILiveConnectionUser, TUILiveInfo, TUILiveListResult, TUILiveModifyInfo, TUILiveStatisticsData, TUILoginUserInfo, TUIMessage, TUINetwork, TUIRequest, TUIRequestCallback, TUIRoomInfo, TUISeatInfo, TUISeatLayout, TUISeatLockParams, TUISeatRegion, TUIUserInfo, TUIVideoEncoderParams };