@tencentcloud/tuiroom-engine-js 2.5.0 → 2.6.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/index.cjs.js +1 -1
- package/index.d.ts +399 -18
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +2 -2
package/index.d.ts
CHANGED
|
@@ -317,6 +317,27 @@ type TUIConferenceModifyInfo = {
|
|
|
317
317
|
roomName?: string;
|
|
318
318
|
};
|
|
319
319
|
};
|
|
320
|
+
declare enum TUIInvitationStatus {
|
|
321
|
+
kNone = 0,
|
|
322
|
+
kPending = 1,
|
|
323
|
+
kTimeout = 2,
|
|
324
|
+
kAccepted = 3,
|
|
325
|
+
kRejected = 4
|
|
326
|
+
}
|
|
327
|
+
declare enum TUIInvitationCode {
|
|
328
|
+
kSuccess = 0,
|
|
329
|
+
kAlreadyInInvitationList = 1,
|
|
330
|
+
kAlreadyInConference = 2
|
|
331
|
+
}
|
|
332
|
+
declare enum TUIInvitationRejectedReason {
|
|
333
|
+
kRejectToEnter = 0,
|
|
334
|
+
kInOtherConference = 1
|
|
335
|
+
}
|
|
336
|
+
type TUIInvitation = {
|
|
337
|
+
status: TUIInvitationStatus;
|
|
338
|
+
invitee: TUIUserInfo;
|
|
339
|
+
inviter: TUIUserInfo;
|
|
340
|
+
};
|
|
320
341
|
/**
|
|
321
342
|
* **TUIRoomEngine 事件列表**<br>
|
|
322
343
|
* @namespace TUIRoomEvents
|
|
@@ -907,6 +928,187 @@ declare enum TUIConferenceListManagerEvents {
|
|
|
907
928
|
* })
|
|
908
929
|
*/
|
|
909
930
|
onConferenceStatusChanged = "onConferenceStatusChanged"
|
|
931
|
+
}
|
|
932
|
+
/**
|
|
933
|
+
* @since v2.6.0
|
|
934
|
+
* **TUIConferenceInvitationManager 事件列表**<br>
|
|
935
|
+
* @namespace TUIConferenceInvitationManagerEvents
|
|
936
|
+
*/
|
|
937
|
+
declare enum TUIConferenceInvitationManagerEvents {
|
|
938
|
+
/**
|
|
939
|
+
* @description 收到会中邀请回调
|
|
940
|
+
* @default 'onReceiveInvitation'
|
|
941
|
+
* @event TUIConferenceInvitationManagerEvents#onReceiveInvitation
|
|
942
|
+
* @param {object} options
|
|
943
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
944
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
945
|
+
* @param {string} options.extensionInfo 自定义扩展信息
|
|
946
|
+
*
|
|
947
|
+
*
|
|
948
|
+
* @example
|
|
949
|
+
* const roomEngine = new TUIRoomEngine();
|
|
950
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
951
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onReceiveInvitation, ({ roomInfo, invitation, extensionInfo }) => {
|
|
952
|
+
* console.log('conferenceInvitationManager.onReceiveInvitation', roomInfo, invitation, extensionInfo);
|
|
953
|
+
* })
|
|
954
|
+
*/
|
|
955
|
+
onReceiveInvitation = "onReceiveInvitation",
|
|
956
|
+
/**
|
|
957
|
+
* @description 邀请在其他设备处理的回调
|
|
958
|
+
* @default 'onInvitationHandledByOtherDevice'
|
|
959
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationHandledByOtherDevice
|
|
960
|
+
* @param {object} options
|
|
961
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
962
|
+
* @param {boolean} options.accepted 接受状态。
|
|
963
|
+
*
|
|
964
|
+
*
|
|
965
|
+
* @example
|
|
966
|
+
* const roomEngine = new TUIRoomEngine();
|
|
967
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
968
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationHandledByOtherDevice, ({ roomInfo, accepted }) => {
|
|
969
|
+
* console.log('conferenceInvitationManager.onInvitationHandledByOtherDevice', roomInfo, accepted);
|
|
970
|
+
* })
|
|
971
|
+
*/
|
|
972
|
+
onInvitationHandledByOtherDevice = "onInvitationHandledByOtherDevice",
|
|
973
|
+
/**
|
|
974
|
+
* @description 会中邀请取消的回调
|
|
975
|
+
* @default 'onInvitationCancelled'
|
|
976
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationCancelled
|
|
977
|
+
* @param {object} options
|
|
978
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
979
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
980
|
+
*
|
|
981
|
+
*
|
|
982
|
+
* @example
|
|
983
|
+
* const roomEngine = new TUIRoomEngine();
|
|
984
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
985
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationCancelled, ({ roomInfo, invitation }) => {
|
|
986
|
+
* console.log('conferenceInvitationManager.onInvitationCancelled', roomInfo, invitation);
|
|
987
|
+
* })
|
|
988
|
+
*/
|
|
989
|
+
onInvitationCancelled = "onInvitationCancelled",
|
|
990
|
+
/**
|
|
991
|
+
* @description 会中邀请接受的回调
|
|
992
|
+
* @default 'onInvitationAccepted'
|
|
993
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationAccepted
|
|
994
|
+
* @param {object} options
|
|
995
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
996
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
997
|
+
*
|
|
998
|
+
*
|
|
999
|
+
* @example
|
|
1000
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1001
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1002
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAccepted, ({ roomInfo, invitation }) => {
|
|
1003
|
+
* console.log('conferenceInvitationManager.onInvitationAccepted', roomInfo, invitation);
|
|
1004
|
+
* })
|
|
1005
|
+
*/
|
|
1006
|
+
onInvitationAccepted = "onInvitationAccepted",
|
|
1007
|
+
/**
|
|
1008
|
+
* @description 会中邀请拒绝的回调
|
|
1009
|
+
* @default 'onInvitationRejected'
|
|
1010
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRejected
|
|
1011
|
+
* @param {object} options
|
|
1012
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1013
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1014
|
+
* @param {TUIInvitationRejectedReason} options.reason 拒绝加入会议的原因。
|
|
1015
|
+
*
|
|
1016
|
+
*
|
|
1017
|
+
*
|
|
1018
|
+
* @example
|
|
1019
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1020
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1021
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRejected, ({ roomInfo, invitation, reason }) => {
|
|
1022
|
+
* console.log('conferenceInvitationManager.onInvitationRejected', roomInfo, invitation, reason);
|
|
1023
|
+
* })
|
|
1024
|
+
*/
|
|
1025
|
+
onInvitationRejected = "onInvitationRejected",
|
|
1026
|
+
/**
|
|
1027
|
+
* @description 会中邀请超时的回调
|
|
1028
|
+
* @default 'onInvitationTimeout'
|
|
1029
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationTimeout
|
|
1030
|
+
* @param {object} options
|
|
1031
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1032
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1033
|
+
*
|
|
1034
|
+
*
|
|
1035
|
+
* @example
|
|
1036
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1037
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1038
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationTimeout, ({ roomInfo, invitation }) => {
|
|
1039
|
+
* console.log('conferenceInvitationManager.onInvitationTimeout', roomInfo, invitation);
|
|
1040
|
+
* })
|
|
1041
|
+
*/
|
|
1042
|
+
onInvitationTimeout = "onInvitationTimeout",
|
|
1043
|
+
/**
|
|
1044
|
+
* @description 会中邀请被管理员撤回的回调
|
|
1045
|
+
* @default 'onInvitationRevokedByAdmin'
|
|
1046
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRevokedByAdmin
|
|
1047
|
+
* @param {object} options
|
|
1048
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1049
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1050
|
+
* @param {TUIUserInfo} options.operateUser 撤回邀请的人的信息
|
|
1051
|
+
*
|
|
1052
|
+
*
|
|
1053
|
+
* @example
|
|
1054
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1055
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1056
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRevokedByAdmin, ({ roomInfo, invitation, userRole }) => {
|
|
1057
|
+
* console.log('conferenceInvitationManager.onInvitationRevokedByAdmin', roomInfo, invitation, operateUser);
|
|
1058
|
+
* })
|
|
1059
|
+
*/
|
|
1060
|
+
onInvitationRevokedByAdmin = "onInvitationRevokedByAdmin",
|
|
1061
|
+
/**
|
|
1062
|
+
* @description 新添加会中邀请的回调
|
|
1063
|
+
* @default 'onInvitationAdded'
|
|
1064
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationAdded
|
|
1065
|
+
* @param {object} options
|
|
1066
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1067
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1068
|
+
*
|
|
1069
|
+
*
|
|
1070
|
+
* @example
|
|
1071
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1072
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1073
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationAdded, ({ roomInfo, invitation }) => {
|
|
1074
|
+
* console.log('conferenceInvitationManager.onInvitationAdded', roomInfo, invitation);
|
|
1075
|
+
* })
|
|
1076
|
+
*/
|
|
1077
|
+
onInvitationAdded = "onInvitationAdded",
|
|
1078
|
+
/**
|
|
1079
|
+
* @description 会中邀请被移除的回调
|
|
1080
|
+
* @default 'onInvitationRemoved'
|
|
1081
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationRemoved
|
|
1082
|
+
* @param {object} options
|
|
1083
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1084
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1085
|
+
*
|
|
1086
|
+
*
|
|
1087
|
+
* @example
|
|
1088
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1089
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1090
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationRemoved, ({ roomInfo, invitation }) => {
|
|
1091
|
+
* console.log('conferenceInvitationManager.onInvitationRemoved', roomInfo, invitation);
|
|
1092
|
+
* })
|
|
1093
|
+
*/
|
|
1094
|
+
onInvitationRemoved = "onInvitationRemoved",
|
|
1095
|
+
/**
|
|
1096
|
+
* @description 会中邀请状态变更的回调
|
|
1097
|
+
* @default 'onInvitationStatusChanged'
|
|
1098
|
+
* @event TUIConferenceInvitationManagerEvents#onInvitationStatusChanged
|
|
1099
|
+
* @param {object} options
|
|
1100
|
+
* @param {TUIRoomInfo} options.roomInfo 会议信息。
|
|
1101
|
+
* @param {TUIInvitation} options.invitation 邀请信息。
|
|
1102
|
+
*
|
|
1103
|
+
*
|
|
1104
|
+
* @example
|
|
1105
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1106
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1107
|
+
* conferenceInvitationManager.on(TUIConferenceInvitationManagerEvents.onInvitationStatusChanged, ({ roomInfo, invitation }) => {
|
|
1108
|
+
* console.log('conferenceInvitationManager.onInvitationStatusChanged', roomInfo, invitation);
|
|
1109
|
+
* })
|
|
1110
|
+
*/
|
|
1111
|
+
onInvitationStatusChanged = "onInvitationStatusChanged"
|
|
910
1112
|
}
|
|
911
1113
|
|
|
912
1114
|
declare class Logger {
|
|
@@ -918,7 +1120,7 @@ declare class Logger {
|
|
|
918
1120
|
sdkAppId: number;
|
|
919
1121
|
seq: number;
|
|
920
1122
|
});
|
|
921
|
-
getLogMessage(params: any[]): string;
|
|
1123
|
+
getLogMessage(params: any[]): string | any[];
|
|
922
1124
|
update(options: {
|
|
923
1125
|
sdkAppId: number;
|
|
924
1126
|
userId: string;
|
|
@@ -1103,8 +1305,8 @@ declare class TUIConferenceListManager {
|
|
|
1103
1305
|
constructor(options: {
|
|
1104
1306
|
Module: any;
|
|
1105
1307
|
logger: Logger;
|
|
1308
|
+
roomEngineWASM: any;
|
|
1106
1309
|
});
|
|
1107
|
-
setConferenceListManagerWASM(conferenceListManager: any): void;
|
|
1108
1310
|
/**
|
|
1109
1311
|
* @private
|
|
1110
1312
|
* 调用 TUIRoomEngineWASM 的异步方法
|
|
@@ -1188,8 +1390,8 @@ declare class TUIConferenceListManager {
|
|
|
1188
1390
|
* @param {object} options
|
|
1189
1391
|
* @param {string} options.roomId 会议的房间Id。
|
|
1190
1392
|
* @param {string} options.roomName 会议的名称。
|
|
1191
|
-
* @param {
|
|
1192
|
-
* @param {
|
|
1393
|
+
* @param {number} options.scheduleStartTime 预定会议的开始时间(计数单位为秒的时间戳)。
|
|
1394
|
+
* @param {number} options.scheduleEndTime 预定会议的结束时间(计数单位为秒的时间戳)。
|
|
1193
1395
|
* @returns {Promise<void>}
|
|
1194
1396
|
*
|
|
1195
1397
|
* @example
|
|
@@ -1212,9 +1414,9 @@ declare class TUIConferenceListManager {
|
|
|
1212
1414
|
* 获取预定会议列表
|
|
1213
1415
|
*
|
|
1214
1416
|
* @param {object} options
|
|
1215
|
-
* @param {
|
|
1417
|
+
* @param {Array<TUIConferenceStatus>} options.statusArray 会议状态数组,默认值为拉取全部状态会议。
|
|
1216
1418
|
* @param {string} options.cursor 分页获取索引,第一次拉取填 '',回调成功 如果callback返回的数据中 cursor 不为 '',表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的cursor为 '',表示数据已经全部拉取。
|
|
1217
|
-
* @param {
|
|
1419
|
+
* @param {number} options.count 本次拉取数量。
|
|
1218
1420
|
*
|
|
1219
1421
|
* @example
|
|
1220
1422
|
* const roomEngine = new TUIRoomEngine();
|
|
@@ -1240,7 +1442,7 @@ declare class TUIConferenceListManager {
|
|
|
1240
1442
|
* @param {object} options
|
|
1241
1443
|
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1242
1444
|
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1243
|
-
* @param {
|
|
1445
|
+
* @param {number} options.count 本次拉取数量。
|
|
1244
1446
|
*
|
|
1245
1447
|
* @example
|
|
1246
1448
|
* const roomEngine = new TUIRoomEngine();
|
|
@@ -1268,7 +1470,7 @@ declare class TUIConferenceListManager {
|
|
|
1268
1470
|
*
|
|
1269
1471
|
* @param {object} options
|
|
1270
1472
|
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1271
|
-
* @param {string} options.userIdList 成员 userId 列表。
|
|
1473
|
+
* @param {Array<string>} options.userIdList 成员 userId 列表。
|
|
1272
1474
|
* @returns {Promise<void>}
|
|
1273
1475
|
*
|
|
1274
1476
|
* @example
|
|
@@ -1288,7 +1490,7 @@ declare class TUIConferenceListManager {
|
|
|
1288
1490
|
*
|
|
1289
1491
|
* @param {object} options
|
|
1290
1492
|
* @param {string} options.roomId 会议 Id ,即房间 roomId 。
|
|
1291
|
-
* @param {string} options.userIdList 成员 userId 列表。
|
|
1493
|
+
* @param {Array<string>} options.userIdList 成员 userId 列表。
|
|
1292
1494
|
* @returns {Promise<void>}
|
|
1293
1495
|
*
|
|
1294
1496
|
* @example
|
|
@@ -1315,7 +1517,7 @@ declare class TUIConferenceListManager {
|
|
|
1315
1517
|
* conferenceListManager.on(event, func);
|
|
1316
1518
|
*/
|
|
1317
1519
|
on(event: TUIConferenceListManagerEvents, func: (...args: any[]) => void): void;
|
|
1318
|
-
private
|
|
1520
|
+
private observerFunction;
|
|
1319
1521
|
private handleConferenceChangedEvent;
|
|
1320
1522
|
/**
|
|
1321
1523
|
* 取消监听 ConferenceListManager 的事件
|
|
@@ -1331,6 +1533,167 @@ declare class TUIConferenceListManager {
|
|
|
1331
1533
|
off(event: string, func: (...args: any[]) => void): void;
|
|
1332
1534
|
}
|
|
1333
1535
|
|
|
1536
|
+
/**
|
|
1537
|
+
* 会中呼叫
|
|
1538
|
+
* @class conferenceInvitationManager
|
|
1539
|
+
*/
|
|
1540
|
+
declare class TUIConferenceInvitationManager {
|
|
1541
|
+
private conferenceInvitationManagerWASM;
|
|
1542
|
+
private logger;
|
|
1543
|
+
private static conferenceInvitationManager;
|
|
1544
|
+
constructor(options: {
|
|
1545
|
+
Module: any;
|
|
1546
|
+
logger: Logger;
|
|
1547
|
+
roomEngineWASM: any;
|
|
1548
|
+
});
|
|
1549
|
+
/**
|
|
1550
|
+
* @private
|
|
1551
|
+
* 调用 TUIRoomEngineWASM 的异步方法
|
|
1552
|
+
* @param funcName
|
|
1553
|
+
* @param args
|
|
1554
|
+
*/
|
|
1555
|
+
private JSCallNativeFunctionPromise;
|
|
1556
|
+
/**
|
|
1557
|
+
* 会中呼叫
|
|
1558
|
+
* @param {object} options
|
|
1559
|
+
* @param {string} options.roomId 房间 Id,必填, roomId 限制长度为64字节,且仅支持以下范围的字符集:<br>
|
|
1560
|
+
* - 大小写英文字母(a-zA-Z)
|
|
1561
|
+
* - 数字(0-9)
|
|
1562
|
+
* - 空格 ! # $ % & ( ) + - : ; < = . > ? @ [ ] ^ _ { } | ~ ,
|
|
1563
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1564
|
+
* @param {number} options.timeout 超时时间。若 timeout 设置为 0s ,则无超时时间
|
|
1565
|
+
* @param {string} options.extensionInfo 自定义扩展信息
|
|
1566
|
+
* @returns {Promise<void>}
|
|
1567
|
+
*
|
|
1568
|
+
* @example
|
|
1569
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1570
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1571
|
+
* await conferenceInvitationManager.inviteUsers({
|
|
1572
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1573
|
+
* userIdList: ['123'], // 填入您要呼叫的成员 Id 数组。
|
|
1574
|
+
* timeout: 0,
|
|
1575
|
+
* })
|
|
1576
|
+
*/
|
|
1577
|
+
inviteUsers(options: {
|
|
1578
|
+
roomId: string;
|
|
1579
|
+
userIdList: string[];
|
|
1580
|
+
timeout: number;
|
|
1581
|
+
extensionInfo?: string;
|
|
1582
|
+
}): Promise<void>;
|
|
1583
|
+
/**
|
|
1584
|
+
* 取消呼叫
|
|
1585
|
+
*
|
|
1586
|
+
* @param {object} options
|
|
1587
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1588
|
+
* @param {string} options.userIdList 成员 userId 列表。
|
|
1589
|
+
* @returns {Promise<void>}
|
|
1590
|
+
*
|
|
1591
|
+
* @example
|
|
1592
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1593
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1594
|
+
* await conferenceInvitationManager.cancelInvitation({
|
|
1595
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1596
|
+
* userIdList: ['123'], // 填入您要取消呼叫的成员 Id 数组。
|
|
1597
|
+
* })
|
|
1598
|
+
*/
|
|
1599
|
+
cancelInvitation(options: {
|
|
1600
|
+
roomId: string;
|
|
1601
|
+
userIdList: string[];
|
|
1602
|
+
}): Promise<void>;
|
|
1603
|
+
/**
|
|
1604
|
+
* 接受呼叫
|
|
1605
|
+
*
|
|
1606
|
+
* @param {object} options
|
|
1607
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1608
|
+
* @returns {Promise<void>}
|
|
1609
|
+
*
|
|
1610
|
+
* @example
|
|
1611
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1612
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1613
|
+
* await conferenceInvitationManager.accept({
|
|
1614
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1615
|
+
* })
|
|
1616
|
+
*/
|
|
1617
|
+
accept(options: {
|
|
1618
|
+
roomId: string;
|
|
1619
|
+
}): Promise<void>;
|
|
1620
|
+
/**
|
|
1621
|
+
* 拒绝呼叫
|
|
1622
|
+
*
|
|
1623
|
+
* @param {object} options
|
|
1624
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1625
|
+
* @param {TUIInvitationRejectedReason}options.reason 拒绝邀请的原因
|
|
1626
|
+
* @returns {Promise<void>}
|
|
1627
|
+
*
|
|
1628
|
+
* @example
|
|
1629
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1630
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1631
|
+
* await conferenceInvitationManager.reject({
|
|
1632
|
+
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
1633
|
+
* reason: TUIInvitationRejectedReason.kRejectToEnter, // 主动拒绝进入会议
|
|
1634
|
+
* })
|
|
1635
|
+
*/
|
|
1636
|
+
reject(options: {
|
|
1637
|
+
roomId: string;
|
|
1638
|
+
reason: TUIInvitationRejectedReason;
|
|
1639
|
+
}): Promise<void>;
|
|
1640
|
+
/**
|
|
1641
|
+
* 获取呼叫列表
|
|
1642
|
+
*
|
|
1643
|
+
* @param {object} options
|
|
1644
|
+
* @param {string} options.roomId 会议的房间Id。
|
|
1645
|
+
* @param {string} options.cursor 分页获取索引,第一次拉取填 "",回调成功 如果 callback 返回的数据中 cursor 不为"",表示需要分页,请以返回的 cursor 作为参数再次调用接口拉取,直至返回的 cursor 为"",表示数据已经全部拉取。
|
|
1646
|
+
* @param {string} options.count 本次拉取数量。
|
|
1647
|
+
* @returns {Promise<Array<TUIInvitation>>}
|
|
1648
|
+
*
|
|
1649
|
+
* @example
|
|
1650
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1651
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1652
|
+
* const invitationList = [];
|
|
1653
|
+
* let result;
|
|
1654
|
+
* let cursor = '';
|
|
1655
|
+
* let totalCount = 0;
|
|
1656
|
+
* let roomId = '12345';
|
|
1657
|
+
* let count = 20;
|
|
1658
|
+
* do {
|
|
1659
|
+
* result = await conferenceInvitationManager.getInvitationList({ roomId, cursor, count });
|
|
1660
|
+
* attendeeList.push(...result.attendeeList);
|
|
1661
|
+
* cursor = result.cursor;
|
|
1662
|
+
* totalCount = result.totalCount;
|
|
1663
|
+
* } while (cursor !== '')
|
|
1664
|
+
*/
|
|
1665
|
+
getInvitationList(options: {
|
|
1666
|
+
roomId: string;
|
|
1667
|
+
cursor: string;
|
|
1668
|
+
count: number;
|
|
1669
|
+
}): Promise<Array<TUIInvitation>>;
|
|
1670
|
+
/**
|
|
1671
|
+
* 监听 conferenceInvitationManager 的事件
|
|
1672
|
+
* @param event TUIConferenceListManagerEvents
|
|
1673
|
+
* @param func function
|
|
1674
|
+
* @returns {void}
|
|
1675
|
+
*
|
|
1676
|
+
* @example
|
|
1677
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1678
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1679
|
+
* conferenceInvitationManager.on(event, func);
|
|
1680
|
+
*/
|
|
1681
|
+
on(event: TUIConferenceInvitationManagerEvents, func: (...args: any[]) => void): void;
|
|
1682
|
+
private observerFunction;
|
|
1683
|
+
/**
|
|
1684
|
+
* 取消监听 ConferenceInvitationManager 的事件
|
|
1685
|
+
* @param event TUIConferenceListManagerEvents
|
|
1686
|
+
* @param func function
|
|
1687
|
+
* @returns {void}
|
|
1688
|
+
*
|
|
1689
|
+
* @example
|
|
1690
|
+
* const roomEngine = new TUIRoomEngine();
|
|
1691
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
1692
|
+
* conferenceInvitationManager.off(event, func);
|
|
1693
|
+
*/
|
|
1694
|
+
off(event: string, func: (...args: any[]) => void): void;
|
|
1695
|
+
}
|
|
1696
|
+
|
|
1334
1697
|
/**
|
|
1335
1698
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
1336
1699
|
*
|
|
@@ -1344,7 +1707,7 @@ declare class TUIRoomEngine {
|
|
|
1344
1707
|
private deviceManager;
|
|
1345
1708
|
private deviceManagerWASM;
|
|
1346
1709
|
private conferenceListManager;
|
|
1347
|
-
private
|
|
1710
|
+
private conferenceInvitationManager;
|
|
1348
1711
|
private static userId;
|
|
1349
1712
|
private static sdkAppId;
|
|
1350
1713
|
private static Module;
|
|
@@ -1539,14 +1902,21 @@ declare class TUIRoomEngine {
|
|
|
1539
1902
|
exitRoom(): Promise<void>;
|
|
1540
1903
|
/**
|
|
1541
1904
|
* 获取房间信息
|
|
1905
|
+
* @param {object} options
|
|
1906
|
+
* @param {string} options.roomId 要获取信息的房间Id。
|
|
1907
|
+
* @param {TUIRoomType} options.roomType 要获取信息的房间类型。
|
|
1542
1908
|
* @returns {Promise<TUIRoomInfo>} roomInfo
|
|
1543
|
-
* 获取房间信息
|
|
1544
|
-
*
|
|
1545
1909
|
* @example
|
|
1546
1910
|
* const roomEngine = new TUIRoomEngine();
|
|
1547
|
-
* const roomInfo = await roomEngine.fetchRoomInfo(
|
|
1911
|
+
* const roomInfo = await roomEngine.fetchRoomInfo({
|
|
1912
|
+
* roomId: '12345',
|
|
1913
|
+
* roomType: TUIRoomType.kConference,
|
|
1914
|
+
* });
|
|
1548
1915
|
*/
|
|
1549
|
-
fetchRoomInfo(
|
|
1916
|
+
fetchRoomInfo(options?: {
|
|
1917
|
+
roomId: string;
|
|
1918
|
+
roomType: TUIRoomType;
|
|
1919
|
+
}): Promise<TUIRoomInfo>;
|
|
1550
1920
|
/**
|
|
1551
1921
|
* 更新房间的名字(仅群主或者管理员可以调用)
|
|
1552
1922
|
* @param {object} options
|
|
@@ -1582,7 +1952,7 @@ declare class TUIRoomEngine {
|
|
|
1582
1952
|
*
|
|
1583
1953
|
* @since v2.5.0
|
|
1584
1954
|
* @param {object} options
|
|
1585
|
-
* @param {string} options.password
|
|
1955
|
+
* @param {string} options.password 房间密码,传入空字符串则代表关闭房间密码
|
|
1586
1956
|
* @returns {Promise<void>}
|
|
1587
1957
|
*
|
|
1588
1958
|
* @example
|
|
@@ -2533,7 +2903,7 @@ declare class TUIRoomEngine {
|
|
|
2533
2903
|
* roomEngine.on(event, func);
|
|
2534
2904
|
*/
|
|
2535
2905
|
on(event: TUIRoomEvents, func: (...args: any[]) => void): void;
|
|
2536
|
-
private
|
|
2906
|
+
private observerFunction;
|
|
2537
2907
|
private supportForDeprecatedEvents;
|
|
2538
2908
|
/**
|
|
2539
2909
|
* 取消监听 roomEngine 的事件
|
|
@@ -2710,6 +3080,17 @@ declare class TUIRoomEngine {
|
|
|
2710
3080
|
* @returns {TUIConferenceListManager} conferenceListManager
|
|
2711
3081
|
*/
|
|
2712
3082
|
getConferenceListManager(): TUIConferenceListManager;
|
|
3083
|
+
/**
|
|
3084
|
+
* v2.6.0 版本起支持使用 getConferenceInvitationManager 获取 conferenceInvitation 模块
|
|
3085
|
+
* @since v2.6.0
|
|
3086
|
+
*
|
|
3087
|
+
* @example
|
|
3088
|
+
* //获取会中邀请
|
|
3089
|
+
* const conferenceInvitationManager = roomEngine.getConferenceInvitationManager();
|
|
3090
|
+
*
|
|
3091
|
+
* @returns {TUIConferenceInvitationManager} conferenceInvitationManager
|
|
3092
|
+
*/
|
|
3093
|
+
getConferenceInvitationManager(): TUIConferenceInvitationManager;
|
|
2713
3094
|
/**
|
|
2714
3095
|
* 获取 trtcCloud 实例
|
|
2715
3096
|
* @returns {TRTCCloud} trtcCloud
|
|
@@ -2741,4 +3122,4 @@ declare class TUIRoomEngine {
|
|
|
2741
3122
|
private static handleSetFramework;
|
|
2742
3123
|
}
|
|
2743
3124
|
|
|
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 };
|
|
3125
|
+
export { TRTCRole, TUIAudioQuality, TUIAudioRoute, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, 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 };
|