@tencentcloud/tuiroom-engine-electron 1.7.0 → 2.0.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 +4 -3
- package/index.cjs.js +1 -1
- package/index.d.ts +28 -19
- package/index.esm.js +1 -1
- package/index.js +1 -1
- package/package.json +3 -3
- package/types.d.ts +21 -1
package/index.d.ts
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import TIM from '@tencentcloud/chat';
|
|
2
|
+
import TencentCloudChat from '@tencentcloud/chat';
|
|
2
3
|
import TRTCCloud, { TRTCDeviceInfo, TRTCScreenCaptureSourceInfo } from 'trtc-electron-sdk';
|
|
3
|
-
import { TUIRoomInfo, TUIVideoStreamType, TUIVideoQuality, TUIAudioQuality, TUIRole, TUIRoomEvents, TUIRoomType, TUISeatInfo, TUIRequestCallback, TUISpeechMode, TUIMediaDevice, TUISeatLockParams, TUILoginUserInfo, TUIUserInfo, TUIRequest, TUIVideoEncoderParams, TUIResolutionMode } from './types';
|
|
4
|
+
import { TUIRoomInfo, TUIVideoStreamType, TUIVideoQuality, TUIAudioQuality, TUIRole, TUIRoomEvents, TUIRoomType, TUISeatInfo, TUIRequestCallback, TUISpeechMode, TUIMediaDevice, TUISeatLockParams, TUILoginUserInfo, TUIUserInfo, TUIRequest, TUIVideoEncoderParams, TUIResolutionMode, TUISeatMode } from './types';
|
|
4
5
|
export * from './types';
|
|
5
|
-
export { TRTCDeviceType, TRTCDeviceState, TRTCDeviceInfo, TRTCVideoMirrorType, TRTCVideoRotation, TRTCVideoFillMode, TRTCVideoStreamType, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, Rect, TRTCVideoEncParam, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCScreenCaptureProperty, TRTCVolumeInfo, } from 'trtc-electron-sdk';
|
|
6
|
+
export { TRTCDeviceType, TRTCDeviceState, TRTCDeviceInfo, TRTCVideoMirrorType, TRTCVideoRotation, TRTCVideoFillMode, TRTCVideoStreamType, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureSourceType, Rect, TRTCVideoEncParam, TRTCVideoResolution, TRTCVideoResolutionMode, TRTCScreenCaptureProperty, TRTCVolumeInfo, TRTCLogLevel, } from 'trtc-electron-sdk';
|
|
7
|
+
export { TRTCCloud, TIM, TencentCloudChat };
|
|
6
8
|
/**
|
|
7
9
|
* TUIRoomEngine 提供了音视频房间的能力
|
|
8
10
|
*
|
|
@@ -121,17 +123,10 @@ declare class TUIRoomEngine {
|
|
|
121
123
|
* @param {TUIRoomType=} [options.roomType=TUIRoomType.kConference] 房间类型, 默认值为 TUIRoomType.kConference <br>
|
|
122
124
|
* 办公协同、医疗问诊、远程会议、教育场景,roomType 设置为 TUIRoomType.kConference
|
|
123
125
|
* 电商直播、语聊房场景,roomType 设置为 TUIRoomType.kLivingRoom
|
|
124
|
-
* @param {
|
|
125
|
-
*
|
|
126
|
-
*
|
|
127
|
-
*
|
|
128
|
-
* TUIRoomType.kConference 场景下,TUISpeechMode.kFreeToSpeak 及 TUISpeechMode.kApplyToSpeak 模式可互相切换
|
|
129
|
-
* c. speechMode 设置为 TUISpeechMode.kSpeakAfterTakingSeat,用户进房后需要调用 takeSeat 上麦接口获取打开摄像头和麦克风的权限
|
|
130
|
-
*
|
|
131
|
-
* 2. roomType 为 TUIRoomType.kLivingRoom (直播场景) 时:
|
|
132
|
-
* a. speechMode 设置为 TUISpeechMode.kFreeToSpeak,上麦不需要主持人同意
|
|
133
|
-
* b. speechMode 设置为 TUISpeechMode.kSpeakAfterTakingSeat,上麦需要主持人同意
|
|
134
|
-
* TUIRoomType.kLivingRoom 场景下,TUISpeechMode.kFreeToSpeak 及 TUISpeechMode.kSpeakAfterTakingSeat 模式可互相切换
|
|
126
|
+
* @param {boolean=} [options.isSeatEnabled=false] 是否开启麦位控制,默认值为 false
|
|
127
|
+
* @param {TUISeatMode=} [options.seatMode=TUISeatMode.kFreeToTake] 上麦模式(开启麦位控制后生效),默认值为 TUISeatMode.kFreeToTake <br>
|
|
128
|
+
* 自由上麦模式,台下观众可以自由上麦,无需申请,seatMode 设置为 TUISeatMode.kFreeToTake
|
|
129
|
+
* 申请上麦模式,台下观众上麦需要房主或者管理员同意后才能上麦,seatMode 设置为 TUISeatMode.kApplyToTake
|
|
135
130
|
* @param {boolean=} [options.isMicrophoneDisableForAllUser=false] 是否开启全员禁麦,默认不开启全员禁麦(创建房间可选参数)
|
|
136
131
|
* @param {boolean=} [options.isCameraDisableForAllUser=false] 是否开启全员禁画,默认不开启全员禁画(创建房间可选参数)
|
|
137
132
|
* @param {boolean=} [options.isMessageDisableForAllUser=false] 是否允许成员发送消息,默认不禁止(创建房间可选参数)
|
|
@@ -146,14 +141,15 @@ declare class TUIRoomEngine {
|
|
|
146
141
|
* roomId: '12345', // 填入您的房间 Id, 注意房间 Id 要求为字符串类型
|
|
147
142
|
* roomName: 'Test Room', // 填入您的房间名称, 房间名称默认为 roomId,最长 30 字节
|
|
148
143
|
* roomType: TUIRoomType.kConference, // 设置房间类型为 TUIRoomType.kConference 类型
|
|
149
|
-
*
|
|
144
|
+
* isSeatEnabled: false, // 不开启麦位控制
|
|
150
145
|
* });
|
|
151
146
|
*/
|
|
152
147
|
createRoom(options: {
|
|
153
148
|
roomId: string;
|
|
154
149
|
roomName?: string;
|
|
155
150
|
roomType?: TUIRoomType;
|
|
156
|
-
|
|
151
|
+
isSeatEnabled?: boolean;
|
|
152
|
+
seatMode?: TUISeatMode;
|
|
157
153
|
isMicrophoneDisableForAllUser?: boolean;
|
|
158
154
|
isCameraDisableForAllUser?: boolean;
|
|
159
155
|
isMessageDisableForAllUser?: boolean;
|
|
@@ -218,18 +214,30 @@ declare class TUIRoomEngine {
|
|
|
218
214
|
}): Promise<void>;
|
|
219
215
|
/**
|
|
220
216
|
* 更新房间的发言模式(仅群主或者管理员可以调用)
|
|
217
|
+
* @deprecated 该接口自 v2.0.0 版本废弃
|
|
221
218
|
* @param {object} options
|
|
222
219
|
* @param {TUISpeechMode} options.speechMode 发言类型
|
|
223
220
|
* @returns {Promise<void>}
|
|
221
|
+
*/
|
|
222
|
+
updateRoomSpeechModeByAdmin(options: {
|
|
223
|
+
speechMode: TUISpeechMode;
|
|
224
|
+
}): Promise<void>;
|
|
225
|
+
/**
|
|
226
|
+
* 更新房间上麦模式(仅群主或者管理员可以调用)
|
|
227
|
+
* 房间上麦模式更新后,roomEngine 会通过 TUIRoomEvents.onRoomSeatModeChanged 回调通知房间内用户
|
|
228
|
+
* @since v2.0.0
|
|
229
|
+
* @param {object} options
|
|
230
|
+
* @param {TUISeatMode} options.seatMode 发言类型
|
|
231
|
+
* @returns {Promise<void>}
|
|
224
232
|
*
|
|
225
233
|
* @example
|
|
226
234
|
* const roomEngine = new TUIRoomEngine();
|
|
227
|
-
* await roomEngine.
|
|
228
|
-
*
|
|
235
|
+
* await roomEngine.updateRoomSeatModeByAdmin({
|
|
236
|
+
* seatMode: TUISeatMode.kApplyToTake, // 更新为申请上麦模式
|
|
229
237
|
* });
|
|
230
238
|
*/
|
|
231
|
-
|
|
232
|
-
|
|
239
|
+
updateRoomSeatModeByAdmin(options: {
|
|
240
|
+
seatMode: TUISeatMode;
|
|
233
241
|
}): Promise<void>;
|
|
234
242
|
/**
|
|
235
243
|
* 获取当前房间用户列表,注意该接口一次拉取的用户列表量最大为 100 个
|
|
@@ -970,6 +978,7 @@ declare class TUIRoomEngine {
|
|
|
970
978
|
}): Promise<any>;
|
|
971
979
|
/**
|
|
972
980
|
* 发送文本消息
|
|
981
|
+
* @deprecated 该接口自 v2.0.0 版本废弃,请使用 {@link getTIM} 方法获取 tim 实例发送消息
|
|
973
982
|
* @param {object} options
|
|
974
983
|
* @param {string} options.messageText 文本消息内容
|
|
975
984
|
* @returns {Promise<void>}
|