@tencentcloud/tuiroom-engine-electron 1.2.1 → 1.4.0-bate.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 +4 -4
- package/index.d.ts +30 -8
- package/index.esm.js +4 -4
- package/index.js +4 -4
- package/package.json +3 -3
- package/types.d.ts +44 -17
package/index.d.ts
CHANGED
|
@@ -67,6 +67,9 @@ declare class TUIRoomEngine {
|
|
|
67
67
|
* @param {object} options
|
|
68
68
|
* @param {string} options.userName 用户名,必填
|
|
69
69
|
* @param {string} options.avatarUrl 用户头像,必填
|
|
70
|
+
* @param {object=} options.customInfo 用户自定义资料
|
|
71
|
+
* App 管理员可以通过 [即时通信 IM 控制台 > 用户自定义字段](https://console.cloud.tencent.com/im/user-data) 新增自定义资料字段
|
|
72
|
+
* 用户自定义字段生效以后,用户可以调用 setSelfInfo 接口设置自定义资料
|
|
70
73
|
* @returns {Promise<void>}
|
|
71
74
|
*
|
|
72
75
|
* @example
|
|
@@ -75,10 +78,21 @@ declare class TUIRoomEngine {
|
|
|
75
78
|
* userName: '', // 填写您的新用户名
|
|
76
79
|
* avatarUrl: '', // 填写您的新头像地址
|
|
77
80
|
* })
|
|
81
|
+
*
|
|
82
|
+
* // 设置当前用户用户名, 用户头像及用户自定义消息
|
|
83
|
+
* await TUIRoomEngine.setSelfInfo({
|
|
84
|
+
* userName: '', // 填写您的新用户名
|
|
85
|
+
* avatarUrl: '', // 填写您的新头像地址
|
|
86
|
+
* customInfo: { // 填写用户自定义消息
|
|
87
|
+
* Tag_Profile_Custom_Test: 'value1',
|
|
88
|
+
* Tag_Profile_Custom_profile: 'value2,
|
|
89
|
+
* },
|
|
90
|
+
* })
|
|
78
91
|
*/
|
|
79
92
|
static setSelfInfo(options: {
|
|
80
93
|
userName: string;
|
|
81
94
|
avatarUrl: string;
|
|
95
|
+
customInfo?: Record<string, any>;
|
|
82
96
|
}): Promise<void>;
|
|
83
97
|
/** 获取当前用户信息接口
|
|
84
98
|
* @returns {Promise<TUILoginUserInfo>} loginUserInfo
|
|
@@ -124,8 +138,6 @@ declare class TUIRoomEngine {
|
|
|
124
138
|
* @param {number=} options.maxSeatCount 最大麦位数量 (创建房间可选参数)<br>
|
|
125
139
|
* roomType 为 TUIRoomType.kConference (教育及会议场景) 时,maxSeatCount 值不做限制;
|
|
126
140
|
* roomType 为 TUIRoomType.kLivingRoom (直播场景) 时,maxSeatCount 最大限制为 16;
|
|
127
|
-
* @param {boolean=} [options.enableCDNStreaming=false] 是否开启 CDN 直播流,默认值为 false
|
|
128
|
-
* @param {string=} [options.cdnStreamDomain=''] 直播推流域名,默认值为空
|
|
129
141
|
* @returns {Promise<void>}
|
|
130
142
|
*
|
|
131
143
|
* @example
|
|
@@ -146,8 +158,6 @@ declare class TUIRoomEngine {
|
|
|
146
158
|
isCameraDisableForAllUser?: boolean;
|
|
147
159
|
isMessageDisableForAllUser?: boolean;
|
|
148
160
|
maxSeatCount?: number;
|
|
149
|
-
enableCDNStreaming?: boolean;
|
|
150
|
-
cdnStreamDomain?: string;
|
|
151
161
|
}): Promise<void>;
|
|
152
162
|
/**
|
|
153
163
|
* 进入房间接口
|
|
@@ -262,7 +272,7 @@ declare class TUIRoomEngine {
|
|
|
262
272
|
* 设置本地流的渲染位置
|
|
263
273
|
* @param {object} options 设置本地流的渲染位置的参数
|
|
264
274
|
* @param {TUIVideoStreamType} options.streamType 本地流类型
|
|
265
|
-
* @param {string} options.view streamType 对应的流渲染的 div 元素的 id
|
|
275
|
+
* @param {string | Array<string>} options.view streamType 对应的流渲染的 div 元素的 id
|
|
266
276
|
* @returns {Promise<void>}
|
|
267
277
|
*
|
|
268
278
|
* @example
|
|
@@ -282,7 +292,7 @@ declare class TUIRoomEngine {
|
|
|
282
292
|
*/
|
|
283
293
|
setLocalVideoView(options: {
|
|
284
294
|
streamType: TUIVideoStreamType;
|
|
285
|
-
view: string
|
|
295
|
+
view: string | Array<string>;
|
|
286
296
|
}): void;
|
|
287
297
|
/**
|
|
288
298
|
* 打开本地摄像头,开始视频流采集
|
|
@@ -403,7 +413,7 @@ declare class TUIRoomEngine {
|
|
|
403
413
|
* @param {object} options 设设置远端流渲染区域的参数
|
|
404
414
|
* @param {string} options.userId 用户 Id
|
|
405
415
|
* @param {TUIVideoStreamType} options.streamType 用户流类型
|
|
406
|
-
* @param {string} options.view 播放远端用户流的 div 元素的 id
|
|
416
|
+
* @param {string | Array<string>} options.view 播放远端用户流的 div 元素的 id
|
|
407
417
|
* @returns {Promise<void>}
|
|
408
418
|
*
|
|
409
419
|
* @example
|
|
@@ -426,7 +436,7 @@ declare class TUIRoomEngine {
|
|
|
426
436
|
setRemoteVideoView(options: {
|
|
427
437
|
userId: string;
|
|
428
438
|
streamType: TUIVideoStreamType;
|
|
429
|
-
view: string
|
|
439
|
+
view: string | Array<string>;
|
|
430
440
|
}): Promise<void>;
|
|
431
441
|
/**
|
|
432
442
|
* 开始播放远端用户视频流
|
|
@@ -1143,6 +1153,18 @@ declare class TUIRoomEngine {
|
|
|
1143
1153
|
* await roomEngine.stopCameraDeviceTest();
|
|
1144
1154
|
*/
|
|
1145
1155
|
stopCameraDeviceTest(): Promise<void>;
|
|
1156
|
+
/**
|
|
1157
|
+
* 开始进行麦克风测试
|
|
1158
|
+
* @param options
|
|
1159
|
+
* @param {number} options.interval 麦克风音量的回调时间
|
|
1160
|
+
*/
|
|
1161
|
+
startMicDeviceTest(options: {
|
|
1162
|
+
interval: number;
|
|
1163
|
+
}): Promise<void>;
|
|
1164
|
+
/**
|
|
1165
|
+
* 停止进行麦克风测试
|
|
1166
|
+
*/
|
|
1167
|
+
stopMicDeviceTest(): Promise<void>;
|
|
1146
1168
|
/**
|
|
1147
1169
|
* 获取 trtcCloud 实例
|
|
1148
1170
|
* @returns {TRTCCloud} trtcCloud
|