@tencentcloud/tuiroom-engine-electron 1.4.0 → 1.4.3
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 +1 -0
- package/index.esm.js +2 -2
- package/index.js +2 -2
- package/package.json +2 -2
- package/types.d.ts +26 -10
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tencentcloud/tuiroom-engine-electron",
|
|
3
|
-
"version": "1.4.
|
|
3
|
+
"version": "1.4.3",
|
|
4
4
|
"description": "TUIRoomEngine Electron 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-electron-sdk": "11.3.502-beta.
|
|
23
|
+
"trtc-electron-sdk": "11.3.502-beta.2",
|
|
24
24
|
"tsignaling": "^1.0.6"
|
|
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 type TUIRoomInfo = {
|
|
49
|
+
export declare type TUIRoomInfo = {
|
|
50
50
|
roomId: string;
|
|
51
51
|
roomName: string;
|
|
52
52
|
roomType: TUIRoomType;
|
|
@@ -59,13 +59,13 @@ export type TUIRoomInfo = {
|
|
|
59
59
|
createTime: number;
|
|
60
60
|
roomMemberCount: number;
|
|
61
61
|
};
|
|
62
|
-
export type TUILoginUserInfo = {
|
|
62
|
+
export declare type TUILoginUserInfo = {
|
|
63
63
|
userId: string;
|
|
64
64
|
userName: string;
|
|
65
65
|
avatarUrl: string;
|
|
66
66
|
customInfo: Record<string, any>;
|
|
67
67
|
};
|
|
68
|
-
export type TUISeatLockParams = {
|
|
68
|
+
export declare 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 type TUIMessage = {
|
|
88
|
+
export declare type TUIMessage = {
|
|
89
89
|
messageId: string;
|
|
90
90
|
message: string;
|
|
91
91
|
timestamp: number;
|
|
@@ -118,6 +118,22 @@ export declare enum TUINetworkQuality {
|
|
|
118
118
|
kQualityVeryBad = 5,
|
|
119
119
|
kQualityDown = 6
|
|
120
120
|
}
|
|
121
|
+
/**
|
|
122
|
+
* 消息结构体
|
|
123
|
+
* @typedef {object} TUINetwork
|
|
124
|
+
* @property {string} userId 用户 Id
|
|
125
|
+
* @property {TUINetworkQuality} quality 网络质量
|
|
126
|
+
* @property {number} upLoss 上行丢包率,单位 (%) 该数值越小越好,目前仅本地用户有该信息
|
|
127
|
+
* @property {TUIRole} downLoss 下行丢包率,单位 (%) 该数值越小越好,目前仅本地用户有该信息
|
|
128
|
+
* @property {Number} delay 网络延迟,单位 ms,目前仅本地用户有该信息
|
|
129
|
+
*/
|
|
130
|
+
export declare type TUINetwork = {
|
|
131
|
+
userId: string;
|
|
132
|
+
quality: TUINetworkQuality;
|
|
133
|
+
upLoss: number;
|
|
134
|
+
downLoss: number;
|
|
135
|
+
delay: number;
|
|
136
|
+
};
|
|
121
137
|
export declare enum TUIRoomType {
|
|
122
138
|
kConference = 1,
|
|
123
139
|
kLivingRoom = 2
|
|
@@ -166,7 +182,7 @@ export declare enum TRTCRole {
|
|
|
166
182
|
kAnchor = 0,
|
|
167
183
|
kAudience = 1
|
|
168
184
|
}
|
|
169
|
-
export type TUIUserInfo = {
|
|
185
|
+
export declare type TUIUserInfo = {
|
|
170
186
|
userId: string;
|
|
171
187
|
userName: string;
|
|
172
188
|
avatarUrl: string;
|
|
@@ -176,21 +192,21 @@ export type TUIUserInfo = {
|
|
|
176
192
|
hasScreenStream: boolean;
|
|
177
193
|
roomCustomInfo: Record<string, any>;
|
|
178
194
|
};
|
|
179
|
-
export type TUISeatInfo = {
|
|
195
|
+
export declare type TUISeatInfo = {
|
|
180
196
|
index: number;
|
|
181
197
|
userId: string;
|
|
182
198
|
locked: boolean;
|
|
183
199
|
isVideoLocked: boolean;
|
|
184
200
|
isAudioLocked: boolean;
|
|
185
201
|
};
|
|
186
|
-
export type TUIRequest = {
|
|
202
|
+
export declare type TUIRequest = {
|
|
187
203
|
requestAction: TUIRequestAction;
|
|
188
204
|
timestamp: number;
|
|
189
205
|
requestId: string;
|
|
190
206
|
userId: string;
|
|
191
207
|
content: string;
|
|
192
208
|
};
|
|
193
|
-
export type TUIRequestCallback = {
|
|
209
|
+
export declare type TUIRequestCallback = {
|
|
194
210
|
requestCallbackType: TUIRequestCallbackType;
|
|
195
211
|
requestId: string;
|
|
196
212
|
userId: string;
|
|
@@ -458,12 +474,12 @@ export declare enum TUIRoomEvents {
|
|
|
458
474
|
* @default 'onUserNetworkQualityChanged'
|
|
459
475
|
* @event TUIRoomEvents#onUserNetworkQualityChanged
|
|
460
476
|
* @param {object} options
|
|
461
|
-
* @param {
|
|
477
|
+
* @param {TUINetwork} options.userNetworkList 网络质量信息
|
|
462
478
|
* @example
|
|
463
479
|
* const roomEngine = new TUIRoomEngine();
|
|
464
480
|
* roomEngine.on(TUIRoomEvents.onUserNetworkQualityChanged, ({ userNetworkList }) => {
|
|
465
481
|
* userNetworkList.forEach(userNetwork => {
|
|
466
|
-
* console.log('roomEngine.onUserNetworkQualityChanged', userNetwork.userId, userNetwork.
|
|
482
|
+
* console.log('roomEngine.onUserNetworkQualityChanged', userNetwork.userId, userNetwork.quality, userNetwork.upLoss, userNetwork.downLoss, userNetwork.delay);
|
|
467
483
|
* })
|
|
468
484
|
* });
|
|
469
485
|
*/
|