@tencentcloud/tuiroom-engine-js 1.4.6 → 1.5.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.cjs.js +2 -2
- package/index.d.ts +70 -8
- package/index.esm.js +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/types.d.ts +29 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/tuiroom-engine-js",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.5.1",
|
|
4
4
|
"description": "TUIRoomEngine Web SDK",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"types": "index.d.ts",
|
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"rtc-detect": "^0.0.5",
|
|
22
22
|
"tim-js-sdk": "^2.27.0",
|
|
23
|
-
"trtc-cloud-js-sdk": "^2.1
|
|
23
|
+
"trtc-cloud-js-sdk": "^2.2.1",
|
|
24
24
|
"tsignaling": "^1.0.7"
|
|
25
25
|
}
|
|
26
26
|
}
|
package/types.d.ts
CHANGED
|
@@ -46,7 +46,7 @@ export declare enum TUIErrorCode {
|
|
|
46
46
|
ERR_SEND_MESSAGE_DISABLED_FOR_ALL = -2380,
|
|
47
47
|
ERR_SEND_MESSAGE_DISABLED_FOR_CURRENT = -2381
|
|
48
48
|
}
|
|
49
|
-
export
|
|
49
|
+
export type TUIRoomInfo = {
|
|
50
50
|
roomId: string;
|
|
51
51
|
roomName: string;
|
|
52
52
|
roomType: TUIRoomType;
|
|
@@ -59,13 +59,13 @@ export declare type TUIRoomInfo = {
|
|
|
59
59
|
createTime: number;
|
|
60
60
|
roomMemberCount: number;
|
|
61
61
|
};
|
|
62
|
-
export
|
|
62
|
+
export type TUILoginUserInfo = {
|
|
63
63
|
userId: string;
|
|
64
64
|
userName: string;
|
|
65
65
|
avatarUrl: string;
|
|
66
66
|
customInfo: Record<string, any>;
|
|
67
67
|
};
|
|
68
|
-
export
|
|
68
|
+
export type TUISeatLockParams = {
|
|
69
69
|
lockSeat: boolean;
|
|
70
70
|
lockVideo: boolean;
|
|
71
71
|
lockAudio: boolean;
|
|
@@ -85,7 +85,7 @@ export declare enum TUIRole {
|
|
|
85
85
|
* @property {boolean} userName 用户名称
|
|
86
86
|
* @property {boolean} avatarUrl 用户头像地址
|
|
87
87
|
*/
|
|
88
|
-
export
|
|
88
|
+
export type TUIMessage = {
|
|
89
89
|
messageId: string;
|
|
90
90
|
message: string;
|
|
91
91
|
timestamp: number;
|
|
@@ -127,13 +127,27 @@ export declare enum TUINetworkQuality {
|
|
|
127
127
|
* @property {TUIRole} downLoss 下行丢包率,单位 (%) 该数值越小越好,目前仅本地用户有该信息
|
|
128
128
|
* @property {Number} delay 网络延迟,单位 ms,目前仅本地用户有该信息
|
|
129
129
|
*/
|
|
130
|
-
export
|
|
130
|
+
export type TUINetwork = {
|
|
131
131
|
userId: string;
|
|
132
132
|
quality: TUINetworkQuality;
|
|
133
133
|
upLoss: number;
|
|
134
134
|
downLoss: number;
|
|
135
135
|
delay: number;
|
|
136
136
|
};
|
|
137
|
+
/**
|
|
138
|
+
* 视频编码参数
|
|
139
|
+
* @typedef {object} TUIVideoEncoderParams
|
|
140
|
+
* @property {number} fps 帧率设置
|
|
141
|
+
* @property {number} bitrate 目标编码码率设置
|
|
142
|
+
* @property {TUIVideoQuality} quality 上视频分辨率
|
|
143
|
+
* @property {TUIResolutionMode} resolutionMode 横竖屏模式
|
|
144
|
+
*/
|
|
145
|
+
export type TUIVideoEncoderParams = {
|
|
146
|
+
quality: TUIVideoQuality;
|
|
147
|
+
fps: number;
|
|
148
|
+
bitrate: number;
|
|
149
|
+
resolutionMode: TUIResolutionMode;
|
|
150
|
+
};
|
|
137
151
|
export declare enum TUIRoomType {
|
|
138
152
|
kConference = 1,
|
|
139
153
|
kLivingRoom = 2
|
|
@@ -182,7 +196,11 @@ export declare enum TRTCRole {
|
|
|
182
196
|
kAnchor = 0,
|
|
183
197
|
kAudience = 1
|
|
184
198
|
}
|
|
185
|
-
export declare
|
|
199
|
+
export declare enum TUIResolutionMode {
|
|
200
|
+
kResolutionMode_Landscape = 0,
|
|
201
|
+
kResolutionMode_Portrait = 1
|
|
202
|
+
}
|
|
203
|
+
export type TUIUserInfo = {
|
|
186
204
|
userId: string;
|
|
187
205
|
userName: string;
|
|
188
206
|
avatarUrl: string;
|
|
@@ -192,21 +210,21 @@ export declare type TUIUserInfo = {
|
|
|
192
210
|
hasScreenStream: boolean;
|
|
193
211
|
roomCustomInfo: Record<string, any>;
|
|
194
212
|
};
|
|
195
|
-
export
|
|
213
|
+
export type TUISeatInfo = {
|
|
196
214
|
index: number;
|
|
197
215
|
userId: string;
|
|
198
216
|
locked: boolean;
|
|
199
217
|
isVideoLocked: boolean;
|
|
200
218
|
isAudioLocked: boolean;
|
|
201
219
|
};
|
|
202
|
-
export
|
|
220
|
+
export type TUIRequest = {
|
|
203
221
|
requestAction: TUIRequestAction;
|
|
204
222
|
timestamp: number;
|
|
205
223
|
requestId: string;
|
|
206
224
|
userId: string;
|
|
207
225
|
content: string;
|
|
208
226
|
};
|
|
209
|
-
export
|
|
227
|
+
export type TUIRequestCallback = {
|
|
210
228
|
requestCallbackType: TUIRequestCallbackType;
|
|
211
229
|
requestId: string;
|
|
212
230
|
userId: string;
|
|
@@ -479,7 +497,8 @@ export declare enum TUIRoomEvents {
|
|
|
479
497
|
* const roomEngine = new TUIRoomEngine();
|
|
480
498
|
* roomEngine.on(TUIRoomEvents.onUserNetworkQualityChanged, ({ userNetworkList }) => {
|
|
481
499
|
* userNetworkList.forEach(userNetwork => {
|
|
482
|
-
* console.log('roomEngine.onUserNetworkQualityChanged',
|
|
500
|
+
* console.log('roomEngine.onUserNetworkQualityChanged',
|
|
501
|
+
* userNetwork.userId, userNetwork.quality, userNetwork.upLoss, userNetwork.downLoss, userNetwork.delay);
|
|
483
502
|
* })
|
|
484
503
|
* });
|
|
485
504
|
*/
|