@tencentcloud/tuiroom-engine-js 3.1.0-beta.3 → 3.2.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.d.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { ChatSDK } from '@tencentcloud/chat';
2
2
  export { default as TIM, default as TencentCloudChat } from '@tencentcloud/chat';
3
3
  import TRTCCloud, { TRTCScreenCaptureSourceInfo, TRTCDeviceInfo } from 'trtc-cloud-js-sdk';
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';
4
+ export { Rect, default as TRTCCloud, TRTCDeviceInfo, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCMediaMixingEncParam, TRTCMediaMixingEvent, TRTCMediaSource, TRTCMediaSourceType, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, TRTCVideoEncParam, TRTCVideoFillMode, TRTCVideoMirrorType, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCVolumeInfo } from 'trtc-cloud-js-sdk';
5
5
 
6
6
  declare enum TUIErrorCode {
7
7
  ERR_SUCC = 0,
@@ -758,32 +758,40 @@ declare enum TUIRoomEvents {
758
758
  */
759
759
  onRequestProcessed = "onRequestProcessed",
760
760
  /**
761
+ * @since v3.1.0
761
762
  * @description 接收文本消息事件
762
- * @deprecated 该接口自 v2.0.0 版本废弃,请使用 tim 实例监听收消息事件
763
763
  * @default 'onReceiveTextMessage'
764
764
  * @event TUIRoomEvents#onReceiveTextMessage
765
- * @param {object} options
765
+ * @param {object} options 接收的文本消息
766
766
  * @param {string} options.roomId 房间Id
767
- * @param {TUIMessage} options.message 接收的文本消息
767
+ * @param {string} options.textContent 文本消息内容
768
+ * @param {TUIUserInfo} options.sender 发送者信息
769
+ * @param {number} options.sequence 消息序号
770
+ * @param {object} options.extensionInfo 扩展信息
771
+ * @param {string} options.timestampInSecond 时间戳
768
772
  * @example
769
773
  * const roomEngine = new TUIRoomEngine();
770
- * roomEngine.on(TUIRoomEvents.onReceiveTextMessage, ({ roomId, message }) => {
771
- * console.log('roomEngine.onReceiveTextMessage', roomId, message);
774
+ * roomEngine.on(TUIRoomEvents.onReceiveTextMessage, (message) => {
775
+ * console.log('roomEngine.onReceiveTextMessage', message);
772
776
  * });
773
777
  */
774
778
  onReceiveTextMessage = "onReceiveTextMessage",
775
779
  /**
780
+ * @since v3.1.0
776
781
  * @description 接收自定义消息事件
777
- * @deprecated 该接口自 v2.0.0 版本废弃,请使用 tim 实例监听收消息事件
778
782
  * @default 'onReceiveCustomMessage'
779
783
  * @event TUIRoomEvents#onReceiveCustomMessage
780
- * @param {object} options
784
+ * @param {object} options 接收的自定义消息
781
785
  * @param {string} options.roomId 房间Id
782
- * @param {TUIMessage} options.message 接收的自定义消息
786
+ * @param {string} options.businessId 业务Id
787
+ * @param {string} options.data 自定义消息内容
788
+ * @param {TUIUserInfo} options.sender 发送者信息
789
+ * @param {number} options.sequence 消息序号
790
+ * @param {string} options.timestampInSecond 时间戳
783
791
  * @example
784
792
  * const roomEngine = new TUIRoomEngine();
785
- * roomEngine.on(TUIRoomEvents.onReceiveCustomMessage, ({ roomId, message }) => {
786
- * console.log('roomEngine.onReceiveCustomMessage', roomId, message);
793
+ * roomEngine.on(TUIRoomEvents.onReceiveCustomMessage, (message) => {
794
+ * console.log('roomEngine.onReceiveCustomMessage', message);
787
795
  * });
788
796
  */
789
797
  onReceiveCustomMessage = "onReceiveCustomMessage",
@@ -823,7 +831,18 @@ declare enum TUIRoomEvents {
823
831
  * // 自动播放失败,引导用户与页面进行交互
824
832
  * });
825
833
  */
826
- onAutoPlayFailed = "onAutoPlayFailed"
834
+ onAutoPlayFailed = "onAutoPlayFailed",
835
+ /**
836
+ * @description 房间自定义信息改变的事件
837
+ * @default 'onRoomMetadataChanged'
838
+ * @event TUIRoomEvents#onRoomMetadataChanged
839
+ * @example
840
+ * const roomEngine = new TUIRoomEngine();
841
+ * roomEngine.on(TUIRoomEvents.onRoomMetadataChanged, ({key, value}) => {
842
+ * console.log(key, value);
843
+ * });
844
+ */
845
+ onRoomMetadataChanged = "onRoomMetadataChanged"
827
846
  }
828
847
  declare enum TUIRoomDeviceMangerEvents {
829
848
  /**
@@ -1215,6 +1234,130 @@ declare enum TUILiveLayoutManagerEvents {
1215
1234
  * liveLayoutManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
1216
1235
  */
1217
1236
  onLiveVideoLayoutChanged = "onLiveVideoLayoutChanged"
1237
+ }
1238
+ /**
1239
+ * @since v3.0.5
1240
+ * **TUILiveConnectionManager** 事件列表<br>
1241
+ */
1242
+ declare enum TUILiveConnectionManagerEvents {
1243
+ /**
1244
+ * @description 接收到连线请求的监听事件
1245
+ * @default 'onConnectionRequestReceived'
1246
+ * @event TUILiveConnectionManagerEvents#onConnectionRequestReceived
1247
+ * @param {inviter} options 连线请求发起者
1248
+ * @param {avatarUrl} options.avatarUrl 头像
1249
+ * @param {joinConnectionTime} options.joinConnectionTime 加入连线时间
1250
+ * @param {roomId} options.roomId 房间号
1251
+ * @param {userId} options.userId ID
1252
+ * @param {userName} options.userName 用户名
1253
+ *
1254
+ * @example
1255
+ * const roomEngine = new TUIRoomEngine();
1256
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1257
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionRequestReceived, ({ avatarUrl, joinConnectionTime, roomId, userId, userName }) => {
1258
+ * console.log('liveConnectionManager.onConnectionRequestReceived', avatarUrl, joinConnectionTime, roomId, userId, userName);
1259
+ * });
1260
+ */
1261
+ onConnectionRequestReceived = "onConnectionRequestReceived",
1262
+ /**
1263
+ * @description 连线房间主播人数变更的监听事件
1264
+ * @default 'onConnectionUserListChanged'
1265
+ * @event TUILiveConnectionManagerEvents#onConnectionUserListChanged
1266
+ * @param {object} options
1267
+ * @param {connectedList} options.connectedList 包含连线房间所有主播列表
1268
+ * @param {joinedList} options.joinedList 本次事件变更加入连线房间的主播列表
1269
+ * @param {leavedList} options.leavedList 本次事件变更离开连线房间的主播列表
1270
+ *
1271
+ * @example
1272
+ * const roomEngine = new TUIRoomEngine();
1273
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1274
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionUserListChanged, ({ connectedList, joinedList, leavedList }) => {
1275
+ * console.log('liveConnectionManager.onConnectionUserListChanged', connectedList, joinedList, leavedList);
1276
+ * });
1277
+ */
1278
+ onConnectionUserListChanged = "onConnectionUserListChanged",
1279
+ /**
1280
+ * @description 连线请求被取消的监听事件
1281
+ * @default 'onConnectionRequestCancelled'
1282
+ * @event TUILiveConnectionManagerEvents#onConnectionRequestCancelled
1283
+ * @param {invitee} options 连线请求被邀请者
1284
+ * @param {avatarUrl} options.avatarUrl 头像
1285
+ * @param {joinConnectionTime} options.joinConnectionTime 加入连线时间
1286
+ * @param {roomId} options.roomId 房间号
1287
+ * @param {userId} options.userId ID
1288
+ * @param {userName} options.userName 用户名
1289
+ *
1290
+ * @example
1291
+ * const roomEngine = new TUIRoomEngine();
1292
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1293
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionRequestCancelled, ({ avatarUrl, joinConnectionTime, roomId, userId, userName }) => {
1294
+ * console.log('liveConnectionManager.onConnectionRequestCancelled', avatarUrl, joinConnectionTime, roomId, userId, userName);
1295
+ * });
1296
+ */
1297
+ onConnectionRequestCancelled = "onConnectionRequestCancelled",
1298
+ /**
1299
+ * @description 连线请求被同意的监听事件
1300
+ * @default 'onConnectionRequestAccept'
1301
+ * @event TUILiveConnectionManagerEvents#onConnectionRequestAccept
1302
+ * @param {invitee} options 连线请求被邀请者
1303
+ * @param {avatarUrl} options.avatarUrl 头像
1304
+ * @param {joinConnectionTime} options.joinConnectionTime 加入连线时间
1305
+ * @param {roomId} options.roomId 房间号
1306
+ * @param {userId} options.userId ID
1307
+ * @param {userName} options.userName 用户名
1308
+ *
1309
+ * @example
1310
+ * const roomEngine = new TUIRoomEngine();
1311
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1312
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionRequestAccept, ({ avatarUrl, joinConnectionTime, roomId, userId, userName }) => {
1313
+ * console.log('liveConnectionManager.onConnectionRequestAccept', avatarUrl, joinConnectionTime, roomId, userId, userName);
1314
+ * });
1315
+ */
1316
+ onConnectionRequestAccept = "onConnectionRequestAccept",
1317
+ /**
1318
+ * @description 连线请求被拒绝的监听事件
1319
+ * @default 'onConnectionRequestReject'
1320
+ * @event TUILiveConnectionManagerEvents#onConnectionRequestReject
1321
+ * @param {invitee} options 连线请求被邀请者
1322
+ * @param {avatarUrl} options.avatarUrl 头像
1323
+ * @param {joinConnectionTime} options.joinConnectionTime 加入连线时间
1324
+ * @param {roomId} options.roomId 房间号
1325
+ * @param {userId} options.userId ID
1326
+ * @param {userName} options.userName 用户名
1327
+ *
1328
+ * @example
1329
+ * const roomEngine = new TUIRoomEngine();
1330
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1331
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionRequestReject, ({ avatarUrl, joinConnectionTime, roomId, userId, userName }) => {
1332
+ * console.log('liveConnectionManager.onConnectionRequestReject', avatarUrl, joinConnectionTime, roomId, userId, userName);
1333
+ * });
1334
+ */
1335
+ onConnectionRequestReject = "onConnectionRequestReject",
1336
+ /**
1337
+ * @description 邀请超时的监听事件
1338
+ * @default 'onConnectionRequestTimeout'
1339
+ * @event TUILiveConnectionManagerEvents#onConnectionRequestTimeout
1340
+ * @param {invitee} invitee 连线请求被邀请者
1341
+ * @param {avatarUrl} invitee.avatarUrl 头像
1342
+ * @param {joinConnectionTime} invitee.joinConnectionTime 加入连线时间
1343
+ * @param {roomId} invitee.roomId 房间号
1344
+ * @param {userId} invitee.userId ID
1345
+ * @param {userName} invitee.userName 用户名
1346
+ * @param {inviter} inviter 连线请求邀请者
1347
+ * @param {avatarUrl} inviter.avatarUrl 头像
1348
+ * @param {joinConnectionTime} inviter.joinConnectionTime 加入连线时间
1349
+ * @param {roomId} inviter.roomId 房间号
1350
+ * @param {userId} inviter.userId ID
1351
+ * @param {userName} inviter.userName 用户名
1352
+ *
1353
+ * @example
1354
+ * const roomEngine = new TUIRoomEngine();
1355
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
1356
+ * liveConnectionManager.on(TUILiveConnectionManagerEvents.onConnectionRequestTimeout, (invitee, inviter) => {
1357
+ * console.log('liveConnectionManager.onConnectionRequestTimeout', invitee, inviter);
1358
+ * });
1359
+ */
1360
+ onConnectionRequestTimeout = "onConnectionRequestTimeout"
1218
1361
  }
1219
1362
 
1220
1363
  declare class Logger {
@@ -1251,8 +1394,8 @@ declare class TUIRoomDeviceManager {
1251
1394
  Module: any;
1252
1395
  logger: Logger;
1253
1396
  trtcCloud: TRTCCloud;
1397
+ deviceManagerWASM: any;
1254
1398
  });
1255
- setDeviceManagerWASM(deviceManagerWASM: any): void;
1256
1399
  /**
1257
1400
  * @private
1258
1401
  * 调用 TUIRoomEngineWASM 的异步方法
@@ -2014,6 +2157,113 @@ declare class TUILiveLayoutManager {
2014
2157
  setLiveStreamLayoutInfo(roomId: string, layoutInfo: string): Promise<void>;
2015
2158
  }
2016
2159
 
2160
+ /**
2161
+ * 直播连线
2162
+ * @class TUILiveConnectionManager
2163
+ */
2164
+ declare class TUILiveConnectionManager {
2165
+ private liveConnectionManagerWASM;
2166
+ private logger;
2167
+ private static liveConnectionManager;
2168
+ constructor(options: {
2169
+ Module: any;
2170
+ logger: Logger;
2171
+ roomEngineWASM: any;
2172
+ });
2173
+ /**
2174
+ * 监听 TUILiveConnectionManager 事件
2175
+ * @param {TUILiveConnectionManagerEvents} event 事件名
2176
+ * @param func 事件回调函数
2177
+ *
2178
+ * @example
2179
+ * const roomEngine = new TUIRoomEngine();
2180
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2181
+ * const callback = (inviter) => {
2182
+ * console.log('liveConnectionManager.onConnectionRequestReceived', inviter);
2183
+ * };
2184
+ * liveConnectionManager.on(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
2185
+ */
2186
+ on(event: TUILiveConnectionManagerEvents, func: (...args: any[]) => void): void;
2187
+ /**
2188
+ * 取消监听 TUILiveConnectionManager 事件
2189
+ * @param {TUILiveConnectionManagerEvents} event 事件名
2190
+ * @param func 事件回调函数
2191
+ *
2192
+ * @example
2193
+ * const roomEngine = new TUIRoomEngine();
2194
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2195
+ * const callback = (inviter) => {
2196
+ * console.log('liveConnectionManager.onConnectionRequestReceived', inviter);
2197
+ * };
2198
+ * liveConnectionManager.off(TUILiveLayoutManagerEvents.onLiveVideoLayoutChanged, callback);
2199
+ */
2200
+ off(event: TUILiveConnectionManagerEvents, func: (...args: any[]) => void): void;
2201
+ /**
2202
+ * 请求跨房连线
2203
+ *
2204
+ * @param {Array<string>} roomIdList 待邀请的连线房间ID列表
2205
+ * @param {string} timeOut 请求超时时间, 单位 s
2206
+ * @param {string} extensionInfo 扩展信息, 可选, 默认为: ''
2207
+ * @returns {Promise<void>}
2208
+ *
2209
+ * @example
2210
+ * const roomEngine = new TUIRoomEngine();
2211
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2212
+ * liveConnectionManager.requestConnection(['roomId1','roomId2'], 10);
2213
+ */
2214
+ requestConnection(roomIdList: Array<string>, timeOut: number, extensionInfo?: string): Promise<void>;
2215
+ /**
2216
+ * 取消跨房连线请求
2217
+ *
2218
+ * @param {Array<string>} roomIdList 被取消连线请求的房间Id列表
2219
+ * @returns {Promise<void>}
2220
+ *
2221
+ * @example
2222
+ * const roomEngine = new TUIRoomEngine();
2223
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2224
+ * liveConnectionManager.cancelConnectionRequest(['roomId1', 'roomId2']);
2225
+ */
2226
+ cancelConnectionRequest(roomIdList: Array<string>): Promise<void>;
2227
+ /**
2228
+ * 同意连线请求
2229
+ *
2230
+ * @param {string} roomId 直播房间 ID
2231
+ * @returns {Promise<void>}
2232
+ *
2233
+ * @example
2234
+ * const roomEngine = new TUIRoomEngine();
2235
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2236
+ * liveConnectionManager.acceptConnection('roomId');
2237
+ */
2238
+ acceptConnection(roomId: string): Promise<void>;
2239
+ /**
2240
+ * 拒绝连线请求
2241
+ *
2242
+ * @param {string} roomId 直播房间 ID
2243
+ * @returns {Promise<void>}
2244
+ *
2245
+ * @example
2246
+ * const roomEngine = new TUIRoomEngine();
2247
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2248
+ * liveConnectionManager.rejectConnection('roomId');
2249
+ */
2250
+ rejectConnection(roomId: string): Promise<void>;
2251
+ /**
2252
+ * 断开直播连线
2253
+ *
2254
+ * @returns {Promise<void>}
2255
+ *
2256
+ * @example
2257
+ * const roomEngine = new TUIRoomEngine();
2258
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
2259
+ * liveConnectionManager.disconnect();
2260
+ */
2261
+ disconnect(): Promise<void>;
2262
+ private JSCallNativeFunctionPromise;
2263
+ private observerFunction;
2264
+ private handleLiveConnectionEvent;
2265
+ }
2266
+
2017
2267
  /**
2018
2268
  * TUIRoomEngine 提供了音视频房间的能力
2019
2269
  *
@@ -2030,6 +2280,7 @@ declare class TUIRoomEngine {
2030
2280
  private conferenceInvitationManager;
2031
2281
  private liveListManager;
2032
2282
  private liveLayoutManager;
2283
+ private liveConnectionManager;
2033
2284
  private static userId;
2034
2285
  private static sdkAppId;
2035
2286
  private static Module;
@@ -2038,6 +2289,7 @@ declare class TUIRoomEngine {
2038
2289
  private roomId;
2039
2290
  private localVideoQuality;
2040
2291
  private localAudioQuality;
2292
+ private functionWrapperMap;
2041
2293
  static setModule(Module: any): void;
2042
2294
  static once(event: string, func: (...args: any[]) => void): void;
2043
2295
  static getInstance(): TUIRoomEngine;
@@ -2057,6 +2309,13 @@ declare class TUIRoomEngine {
2057
2309
  */
2058
2310
  private JSCallNativeFunctionPromise;
2059
2311
  private JSCallNativeRequestFunctionPromise;
2312
+ /**
2313
+ * @private
2314
+ * 调用 TUIRoomEngineWASM 的 CallAPI 方法
2315
+ * @param funcName
2316
+ * @param jsonString
2317
+ */
2318
+ private JSCallNativeCallAPIPromise;
2060
2319
  /**
2061
2320
  * 登录 TUIRoomEngine
2062
2321
  *
@@ -2153,6 +2412,7 @@ declare class TUIRoomEngine {
2153
2412
  * @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
2154
2413
  * @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)
2155
2414
  * @param {string=} [options.password=''] 房间密码,(该属性自 v2.5.0 版本支持) <br>
2415
+ * @param {boolean=} [options.keepOwnerOnSeat=false] 是否保持房主座位,默认不保持房主座位(该属性自 v3.1.0 版本支持)
2156
2416
  * roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
2157
2417
  * roomType 为 TUIRoomType.kLive (直播场景) 时,maxSeatCount 最大限制为 16;
2158
2418
  * @returns {Promise<void>}
@@ -2179,6 +2439,7 @@ declare class TUIRoomEngine {
2179
2439
  isMessageDisableForAllUser?: boolean;
2180
2440
  maxSeatCount?: number;
2181
2441
  password?: string;
2442
+ keepOwnerOnSeat?: boolean;
2182
2443
  }): Promise<void>;
2183
2444
  /**
2184
2445
  * 进入房间接口
@@ -2351,6 +2612,36 @@ declare class TUIRoomEngine {
2351
2612
  userId: string;
2352
2613
  customInfo: Record<string, string>;
2353
2614
  }): Promise<void>;
2615
+ /**
2616
+ * 设置房间的自定义信息,该接口仅主播进房后调用
2617
+ * @since v3.1.0
2618
+ * @param {object} options 设置房间自定义信息
2619
+ * @param {string} options.metadata 自定义信息
2620
+ *
2621
+ * @example
2622
+ * const roomEngine = new TUIRoomEngine();
2623
+ * await roomEngine.setRoomMetadataByAdmin({
2624
+ * metadata: JSON.stringify({key1: "value1", key2: "value2"}), // value 只能是 string
2625
+ * });
2626
+ */
2627
+ setRoomMetadataByAdmin(options: {
2628
+ metadata: string;
2629
+ }): Promise<void>;
2630
+ /**
2631
+ * 获取房间的自定义信息
2632
+ * @since v3.1.0
2633
+ * @param {object} options 获取房间自定义信息
2634
+ * @param {Array<string>} options.keys 自定义信息的 key 数组
2635
+ *
2636
+ * @example
2637
+ * const roomEngine = new TUIRoomEngine();
2638
+ * const result = await roomEngine.getRoomMetadata({
2639
+ * keys: ["key1", "key2"] // key 只能是 string
2640
+ * });
2641
+ */
2642
+ getRoomMetadata(options: {
2643
+ keys: Array<string>;
2644
+ }): Promise<any>;
2354
2645
  /**
2355
2646
  * 设置本地视频流的渲染位置
2356
2647
  * @param {object} options 设置本地视频流的渲染位置的参数
@@ -3074,36 +3365,42 @@ declare class TUIRoomEngine {
3074
3365
  */
3075
3366
  getSeatApplicationList(): Promise<TUIRequest[]>;
3076
3367
  /**
3368
+ * @since v3.1.0
3077
3369
  * 发送文本消息
3078
- * @deprecated 该接口自 v2.0.0 版本废弃,请使用 {@link getTIM} 方法获取 tim 实例发送消息
3079
3370
  * @param {object} options
3080
- * @param {string} options.messageText 文本消息内容
3371
+ * @param {string} options.textContent 文本消息内容
3372
+ * @param {object} options.extensionInfo 扩展信息
3081
3373
  * @returns {Promise<void>}
3082
3374
  *
3083
3375
  * @example
3084
3376
  * const roomEngine = new TUIRoomEngine();
3085
3377
  * await roomEngine.sendTextMessage({
3086
- * messageText: 'hello, everyone',
3378
+ * textContent: 'hello, everyone',
3379
+ * extensionInfo: {}
3087
3380
  * });
3088
3381
  */
3089
3382
  sendTextMessage(options: {
3090
- messageText: string;
3383
+ textContent: string;
3384
+ extensionInfo: object;
3091
3385
  }): Promise<void>;
3092
3386
  /**
3387
+ * @since v3.1.0
3093
3388
  * 发送自定义消息
3094
- * @deprecated 该接口自 v2.0.0 版本废弃,请使用 {@link getTIM} 方法获取 tim 实例发送消息
3095
3389
  * @param {object} options
3096
- * @param {string} options.messageText 自定义消息内容
3390
+ * @param {string} options.businessId 业务 Id
3391
+ * @param {string} options.data 自定义消息内容
3097
3392
  * @returns {Promise<void>}
3098
3393
  *
3099
3394
  * @example
3100
3395
  * const roomEngine = new TUIRoomEngine();
3101
3396
  * await roomEngine.sendCustomMessage({
3102
- * messageText: '{ data:'', description: ''}',
3397
+ * businessId: '111',
3398
+ * data: '{"msg":"test"}',
3103
3399
  * });
3104
3400
  */
3105
3401
  sendCustomMessage(options: {
3106
- messageText: string;
3402
+ businessId: string;
3403
+ data: string;
3107
3404
  }): Promise<void>;
3108
3405
  /**
3109
3406
  * 开始屏幕共享
@@ -3185,6 +3482,7 @@ declare class TUIRoomEngine {
3185
3482
  selectScreenSharingTarget(options: {
3186
3483
  targetId: string;
3187
3484
  } | string): Promise<void>;
3485
+ private handleCatchErrorFunction;
3188
3486
  /**
3189
3487
  * 监听 roomEngine 的事件
3190
3488
  * @param event TUIRoomEvents
@@ -3369,7 +3667,6 @@ declare class TUIRoomEngine {
3369
3667
  * @returns {TUIRoomDeviceManager} deviceManager
3370
3668
  */
3371
3669
  getMediaDeviceManager(): TUIRoomDeviceManager;
3372
- private handleDeviceManagerWASM;
3373
3670
  /**
3374
3671
  * v2.5.0 版本起支持使用 getConferenceListManager 获取 conferenceListManager 模块
3375
3672
  * @since v2.5.0
@@ -3403,6 +3700,17 @@ declare class TUIRoomEngine {
3403
3700
  * const liveLayoutManager = roomEngine.getLiveLayoutManager();
3404
3701
  */
3405
3702
  getLiveLayoutManager(): TUILiveLayoutManager;
3703
+ /**
3704
+ * v3.2.0 版本起支持 getLiveConnectionManager 获取 TUILiveConnectionManager 模块
3705
+ *
3706
+ * @since v3.2.0
3707
+ * @returns {TUILiveConnectionManager}
3708
+ *
3709
+ * @example
3710
+ * const roomEngine = new TUIRoomEngine();
3711
+ * const liveConnectionManager = roomEngine.getLiveConnectionManager();
3712
+ */
3713
+ getLiveConnectionManager(): TUILiveConnectionManager;
3406
3714
  /**
3407
3715
  * v2.6.0 版本起支持使用 getConferenceInvitationManager 获取 conferenceInvitation 模块
3408
3716
  * @since v2.6.0
@@ -3445,4 +3753,4 @@ declare class TUIRoomEngine {
3445
3753
  private static handleSetFramework;
3446
3754
  }
3447
3755
 
3448
- export { TRTCRole, TUIAudioQuality, TUIAudioRoute, type TUIAutoPlayCallbackInfo, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, type TUILiveInfo, TUILiveLayoutManagerEvents, TUILiveListManager, TUILiveListManagerEvents, type TUILiveListResult, TUILiveModifyFlag, type TUILiveModifyInfo, 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 };
3756
+ export { TRTCRole, TUIAudioQuality, TUIAudioRoute, type TUIAutoPlayCallbackInfo, TUICaptureSourceType, TUIChangeReason, TUIConferenceCancelReason, type TUIConferenceInfo, TUIConferenceInvitationManager, TUIConferenceInvitationManagerEvents, TUIConferenceListManager, TUIConferenceListManagerEvents, type TUIConferenceModifyInfo, TUIConferenceStatus, type TUIDeviceInfo, type TUIEnterRoomOptions, TUIErrorCode, type TUIInvitation, TUIInvitationCode, TUIInvitationRejectedReason, TUIInvitationStatus, TUIKickedOutOfRoomReason, TUILiveConnectionManagerEvents, type TUILiveInfo, TUILiveLayoutManager, TUILiveLayoutManagerEvents, TUILiveListManager, TUILiveListManagerEvents, type TUILiveListResult, TUILiveModifyFlag, type TUILiveModifyInfo, 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 };