trtc-sdk-v5 5.6.2-beta.9 → 5.6.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 +96 -66
- package/index.d.ts +1822 -1820
- package/package.json +1 -1
- package/plugins/cdn-streaming/package.json +1 -1
- package/plugins/video-effect/beauty/beauty.esm.js +2395 -2211
- package/plugins/video-effect/beauty/beauty.iife.js +2395 -2211
- package/plugins/video-effect/beauty/package.json +1 -1
- package/plugins/video-effect/virtual-background/package.json +1 -1
- package/plugins/video-effect/virtual-background/virtual-background.esm.d.ts +2 -0
- package/plugins/video-effect/virtual-background/virtual-background.esm.js +21 -21
- package/plugins/video-effect/virtual-background/virtual-background.iife.js +21 -21
- package/plugins/video-effect/watermark/package.json +1 -1
- package/trtc.esm.js +25 -25
- package/trtc.js +1 -1
package/core.d.ts
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
|
|
2
|
-
|
|
3
2
|
declare enum LOG_LEVEL {
|
|
4
3
|
/**
|
|
5
4
|
* 输出所有日志
|
|
@@ -55,60 +54,30 @@
|
|
|
55
54
|
readonly frameRate: 15;
|
|
56
55
|
readonly bitrate: 200;
|
|
57
56
|
};
|
|
58
|
-
readonly '120p_2': {
|
|
59
|
-
readonly width: 160;
|
|
60
|
-
readonly height: 120;
|
|
61
|
-
readonly frameRate: 15;
|
|
62
|
-
readonly bitrate: 100;
|
|
63
|
-
};
|
|
64
57
|
readonly '180p': {
|
|
65
58
|
readonly width: 320;
|
|
66
59
|
readonly height: 180;
|
|
67
60
|
readonly frameRate: 15;
|
|
68
61
|
readonly bitrate: 350;
|
|
69
62
|
};
|
|
70
|
-
readonly '180p_2': {
|
|
71
|
-
readonly width: 320;
|
|
72
|
-
readonly height: 180;
|
|
73
|
-
readonly frameRate: 15;
|
|
74
|
-
readonly bitrate: 150;
|
|
75
|
-
};
|
|
76
63
|
readonly '240p': {
|
|
77
64
|
readonly width: 320;
|
|
78
65
|
readonly height: 240;
|
|
79
66
|
readonly frameRate: 15;
|
|
80
67
|
readonly bitrate: 400;
|
|
81
68
|
};
|
|
82
|
-
readonly '240p_2': {
|
|
83
|
-
readonly width: 320;
|
|
84
|
-
readonly height: 240;
|
|
85
|
-
readonly frameRate: 15;
|
|
86
|
-
readonly bitrate: 200;
|
|
87
|
-
};
|
|
88
69
|
readonly '360p': {
|
|
89
70
|
readonly width: 640;
|
|
90
71
|
readonly height: 360;
|
|
91
72
|
readonly frameRate: 15;
|
|
92
73
|
readonly bitrate: 800;
|
|
93
74
|
};
|
|
94
|
-
readonly '360p_2': {
|
|
95
|
-
readonly width: 640;
|
|
96
|
-
readonly height: 360;
|
|
97
|
-
readonly frameRate: 15;
|
|
98
|
-
readonly bitrate: 400;
|
|
99
|
-
};
|
|
100
75
|
readonly '480p': {
|
|
101
76
|
readonly width: 640;
|
|
102
77
|
readonly height: 480;
|
|
103
78
|
readonly frameRate: 15;
|
|
104
79
|
readonly bitrate: 900;
|
|
105
80
|
};
|
|
106
|
-
readonly '480p_2': {
|
|
107
|
-
readonly width: 640;
|
|
108
|
-
readonly height: 480;
|
|
109
|
-
readonly frameRate: 15;
|
|
110
|
-
readonly bitrate: 500;
|
|
111
|
-
};
|
|
112
81
|
readonly '720p': {
|
|
113
82
|
readonly width: 1280;
|
|
114
83
|
readonly height: 720;
|
|
@@ -183,20 +152,6 @@
|
|
|
183
152
|
|
|
184
153
|
|
|
185
154
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
155
|
|
|
201
156
|
|
|
202
157
|
|
|
@@ -245,6 +200,96 @@
|
|
|
245
200
|
|
|
246
201
|
|
|
247
202
|
|
|
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
|
+
}
|
|
248
293
|
|
|
249
294
|
declare const enum PlayerState {
|
|
250
295
|
PAUSED = "PAUSED",
|
|
@@ -281,26 +326,12 @@
|
|
|
281
326
|
USER_TIME_OUT = "user_time_out",
|
|
282
327
|
ROOM_DISBAND = "room_disband"
|
|
283
328
|
}
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
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;
|
|
329
|
+
declare interface AudioSourceOptions {
|
|
330
|
+
id: string;
|
|
331
|
+
url: string;
|
|
332
|
+
loop?: boolean;
|
|
333
|
+
volume?: number;
|
|
334
|
+
operation?: string;
|
|
304
335
|
}
|
|
305
336
|
|
|
306
337
|
|
|
@@ -315,4 +346,3 @@
|
|
|
315
346
|
|
|
316
347
|
|
|
317
348
|
|
|
318
|
-
|