trtc-sdk-v5 5.6.1 → 5.6.2-beta.2
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/core.d.ts +66 -96
- package/index.d.ts +1820 -1820
- package/package.json +1 -1
- package/trtc.esm.js +17 -17
- package/trtc.js +1 -1
package/core.d.ts
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
|
|
2
|
+
|
|
2
3
|
declare enum LOG_LEVEL {
|
|
3
4
|
/**
|
|
4
5
|
* 输出所有日志
|
|
@@ -54,30 +55,60 @@
|
|
|
54
55
|
readonly frameRate: 15;
|
|
55
56
|
readonly bitrate: 200;
|
|
56
57
|
};
|
|
58
|
+
readonly '120p_2': {
|
|
59
|
+
readonly width: 160;
|
|
60
|
+
readonly height: 120;
|
|
61
|
+
readonly frameRate: 15;
|
|
62
|
+
readonly bitrate: 100;
|
|
63
|
+
};
|
|
57
64
|
readonly '180p': {
|
|
58
65
|
readonly width: 320;
|
|
59
66
|
readonly height: 180;
|
|
60
67
|
readonly frameRate: 15;
|
|
61
68
|
readonly bitrate: 350;
|
|
62
69
|
};
|
|
70
|
+
readonly '180p_2': {
|
|
71
|
+
readonly width: 320;
|
|
72
|
+
readonly height: 180;
|
|
73
|
+
readonly frameRate: 15;
|
|
74
|
+
readonly bitrate: 150;
|
|
75
|
+
};
|
|
63
76
|
readonly '240p': {
|
|
64
77
|
readonly width: 320;
|
|
65
78
|
readonly height: 240;
|
|
66
79
|
readonly frameRate: 15;
|
|
67
80
|
readonly bitrate: 400;
|
|
68
81
|
};
|
|
82
|
+
readonly '240p_2': {
|
|
83
|
+
readonly width: 320;
|
|
84
|
+
readonly height: 240;
|
|
85
|
+
readonly frameRate: 15;
|
|
86
|
+
readonly bitrate: 200;
|
|
87
|
+
};
|
|
69
88
|
readonly '360p': {
|
|
70
89
|
readonly width: 640;
|
|
71
90
|
readonly height: 360;
|
|
72
91
|
readonly frameRate: 15;
|
|
73
92
|
readonly bitrate: 800;
|
|
74
93
|
};
|
|
94
|
+
readonly '360p_2': {
|
|
95
|
+
readonly width: 640;
|
|
96
|
+
readonly height: 360;
|
|
97
|
+
readonly frameRate: 15;
|
|
98
|
+
readonly bitrate: 400;
|
|
99
|
+
};
|
|
75
100
|
readonly '480p': {
|
|
76
101
|
readonly width: 640;
|
|
77
102
|
readonly height: 480;
|
|
78
103
|
readonly frameRate: 15;
|
|
79
104
|
readonly bitrate: 900;
|
|
80
105
|
};
|
|
106
|
+
readonly '480p_2': {
|
|
107
|
+
readonly width: 640;
|
|
108
|
+
readonly height: 480;
|
|
109
|
+
readonly frameRate: 15;
|
|
110
|
+
readonly bitrate: 500;
|
|
111
|
+
};
|
|
81
112
|
readonly '720p': {
|
|
82
113
|
readonly width: 1280;
|
|
83
114
|
readonly height: 720;
|
|
@@ -152,6 +183,20 @@
|
|
|
152
183
|
|
|
153
184
|
|
|
154
185
|
|
|
186
|
+
|
|
187
|
+
|
|
188
|
+
|
|
189
|
+
|
|
190
|
+
|
|
191
|
+
|
|
192
|
+
|
|
193
|
+
|
|
194
|
+
|
|
195
|
+
|
|
196
|
+
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
155
200
|
|
|
156
201
|
|
|
157
202
|
|
|
@@ -200,96 +245,6 @@
|
|
|
200
245
|
|
|
201
246
|
|
|
202
247
|
|
|
203
|
-
declare const enum NetworkQualityValue {
|
|
204
|
-
UNKNOWN,
|
|
205
|
-
EXCELLENT,
|
|
206
|
-
GOOD,
|
|
207
|
-
POOR,
|
|
208
|
-
BAD,
|
|
209
|
-
VERY_BAD,
|
|
210
|
-
DISCONNECTED
|
|
211
|
-
}
|
|
212
|
-
|
|
213
|
-
declare const enum RemoteStreamType {
|
|
214
|
-
Main = 'main',
|
|
215
|
-
Aux = 'auxiliary',
|
|
216
|
-
}
|
|
217
|
-
|
|
218
|
-
declare interface MixTranscodeConfig {
|
|
219
|
-
/** Stream mixing mode */
|
|
220
|
-
mode?: 'manual' | 'preset-layout';
|
|
221
|
-
/** Stream ID after mixtranscoding. Default value: '' */
|
|
222
|
-
streamId?: string;
|
|
223
|
-
/**
|
|
224
|
-
* Width of the video resolution in px after transcoding. Default value: 640.
|
|
225
|
-
*
|
|
226
|
-
* The value must be greater than or equal to 0 and is large enough so that all mixed video streams can be accommodated.
|
|
227
|
-
*/
|
|
228
|
-
videoWidth?: number;
|
|
229
|
-
/**
|
|
230
|
-
* Height of the video resolution in px after transcoding. Default value: 480.
|
|
231
|
-
*
|
|
232
|
-
* The value must be greater than or equal to 0 and is large enough so that all mixed video streams can be accommodated.
|
|
233
|
-
*/
|
|
234
|
-
videoHeight?: number;
|
|
235
|
-
/** Video bitrate (Kbps) after transcoding. If `0` is passed in, the bitrate value is determined by `videoWidth` and `videoHeight`. */
|
|
236
|
-
videoBitrate?: number;
|
|
237
|
-
/** Video frame rate (fps) after transcoding. Default value: 15. Value range: (0, 30]. */
|
|
238
|
-
videoFramerate?: number;
|
|
239
|
-
/** Video keyframe interval (s) after transcoding. Default value: 2. Value range: [1, 8]. */
|
|
240
|
-
videoGOP?: number;
|
|
241
|
-
/** Audio sample rate (Hz) after transcoding. Default value: 48000 */
|
|
242
|
-
audioSampleRate?: number;
|
|
243
|
-
/** Audio bitrate (Kbps) after transcoding. Default value: 64. Value range: [32, 192]. */
|
|
244
|
-
audioBitrate?: number;
|
|
245
|
-
/** Number of sound channels after transcoding. Valid values: 1 (default), 2 */
|
|
246
|
-
audioChannels?: 1 | 2;
|
|
247
|
-
/** Background color of the image after mixing. The value must be a hexadecimal number. Default value: 0x000000 (black) */
|
|
248
|
-
backgroundColor?: number;
|
|
249
|
-
/** Background picture of the image after mixing. Default value: '' */
|
|
250
|
-
backgroundImage?: string;
|
|
251
|
-
/** Information list of users' streams mixed. The list must contain API caller information. */
|
|
252
|
-
mixUsers: MixUser[];
|
|
253
|
-
}
|
|
254
|
-
/**
|
|
255
|
-
* @link https://web.sdk.qcloud.com/trtc/webrtc/doc/en/global.html#MixUser
|
|
256
|
-
*/
|
|
257
|
-
declare interface MixUser {
|
|
258
|
-
/** userId */
|
|
259
|
-
userId: string;
|
|
260
|
-
/**
|
|
261
|
-
* user's roomId. You can use this param to mix streams from diffrent rooms.
|
|
262
|
-
* @since 4.11.5
|
|
263
|
-
*/
|
|
264
|
-
roomId: number | string;
|
|
265
|
-
/** Only the user's audio stream is mixed in. If the value is `true`, the following video parameters do not need to be passed in. */
|
|
266
|
-
pureAudio: boolean;
|
|
267
|
-
/** Width (px) of the user's stream in the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
|
|
268
|
-
width?: number;
|
|
269
|
-
/** Height (px) of the user's stream in the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
|
|
270
|
-
height?: number;
|
|
271
|
-
/** X coordinate (px) of the user's stream in the mixed stream, starting from the upper left corner of the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
|
|
272
|
-
locationX?: number;
|
|
273
|
-
/** Y coordinate (px) of the user's stream in the mixed stream, starting from the upper left corner of the mixed stream. The value must be greater than or equal to 0. The default value is 0. */
|
|
274
|
-
locationY?: number;
|
|
275
|
-
/** Layer number of the user's stream in the mixed stream. The value range is [1, 15]. If `pureAudio` is `false`, `zOrder` must be passed in. */
|
|
276
|
-
zOrder?: number;
|
|
277
|
-
/** Remote stream type in manual mode. This parameter does not need to be set in preset layout mode. Valid values: `main` (primary stream), `auxiliary` (substream of screen sharing) */
|
|
278
|
-
streamType?: RemoteStreamType;
|
|
279
|
-
renderMode?: 0 | 1 | 2;
|
|
280
|
-
}
|
|
281
|
-
|
|
282
|
-
declare interface PublishCDNStreamOptions {
|
|
283
|
-
/** Custom stream ID. Default value: ${sdkAppId}_${roomId}_${userId}_main */
|
|
284
|
-
streamId?: string;
|
|
285
|
-
streamType?: RemoteStreamType;
|
|
286
|
-
/** Tencent Cloud live streaming `appId` */
|
|
287
|
-
appId?: number;
|
|
288
|
-
/** Tencent Cloud live streaming `bizId` */
|
|
289
|
-
bizId?: number;
|
|
290
|
-
/** Specified CDN address for stream publishing */
|
|
291
|
-
url?: string;
|
|
292
|
-
}
|
|
293
248
|
|
|
294
249
|
declare const enum PlayerState {
|
|
295
250
|
PAUSED = "PAUSED",
|
|
@@ -326,12 +281,26 @@
|
|
|
326
281
|
USER_TIME_OUT = "user_time_out",
|
|
327
282
|
ROOM_DISBAND = "room_disband"
|
|
328
283
|
}
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
284
|
+
|
|
285
|
+
|
|
286
|
+
declare interface Core {
|
|
287
|
+
room: IRoom;
|
|
288
|
+
innerEmitter: EventEmitter<InnerEventTypes>;
|
|
289
|
+
constants: typeof constants;
|
|
290
|
+
environment: typeof environment;
|
|
291
|
+
utils: typeof utils;
|
|
292
|
+
log: Logger;
|
|
293
|
+
eventLogger: typeof eventLogger;
|
|
294
|
+
clearStarted(plugin: IPlugin, group: string): void;
|
|
295
|
+
}
|
|
296
|
+
declare interface IPlugin<T = any> {
|
|
297
|
+
getName(): string;
|
|
298
|
+
getAlias(): string;
|
|
299
|
+
getGroup(option: T): string;
|
|
300
|
+
getValidateRule(method: 'start' | 'update' | 'stop'): ValidateRule | ValidateRule[];
|
|
301
|
+
start(option: T): void;
|
|
302
|
+
update(option: T): void;
|
|
303
|
+
stop(option: T): void;
|
|
335
304
|
}
|
|
336
305
|
|
|
337
306
|
|
|
@@ -346,3 +315,4 @@
|
|
|
346
315
|
|
|
347
316
|
|
|
348
317
|
|
|
318
|
+
|