trtc-electron-sdk 8.9.102 → 9.1.100-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/liteav/trtc.d.ts +1 -24
- package/liteav/trtc.js +15 -77
- package/liteav/trtc_define.d.ts +39 -42
- package/liteav/trtc_define.js +146 -150
- package/package.json +1 -1
- package/scripts/publish-doc.js +1 -1
package/liteav/trtc.d.ts
CHANGED
|
@@ -1493,29 +1493,6 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1493
1493
|
* @param {Number} volume - 设置的混音音量大小,范围0 - 100
|
|
1494
1494
|
*/
|
|
1495
1495
|
setSubStreamMixVolume(volume: number): void;
|
|
1496
|
-
/**
|
|
1497
|
-
* 8.13 将指定窗口加入屏幕分享的排除列表中,加入排除列表中的窗口不会被分享出去
|
|
1498
|
-
*
|
|
1499
|
-
* 支持启动屏幕分享前设置过滤窗口,也支持屏幕分享过程中动态添加过滤窗口。
|
|
1500
|
-
*
|
|
1501
|
-
* @param {String} win - 不希望分享出去的窗口
|
|
1502
|
-
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
1503
|
-
* - Windows下该方法添加的窗口列表会在退房后清空;Mac下在退出房间时不会自动清空,需要调用一次removeAllExcludedShareWindow()方法清空列表。
|
|
1504
|
-
*/
|
|
1505
|
-
addExcludedShareWindow(win: string): void;
|
|
1506
|
-
/**
|
|
1507
|
-
* 8.14 将指定窗口从屏幕分享的排除列表中移除
|
|
1508
|
-
*
|
|
1509
|
-
* @param {String} win - 不希望分享出去的窗口
|
|
1510
|
-
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
1511
|
-
*/
|
|
1512
|
-
removeExcludedShareWindow(win: string): void;
|
|
1513
|
-
/**
|
|
1514
|
-
* 8.15 将所有窗口从屏幕分享的排除列表中移除
|
|
1515
|
-
*
|
|
1516
|
-
* @note 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
1517
|
-
*/
|
|
1518
|
-
removeAllExcludedShareWindow(): void;
|
|
1519
1496
|
/**
|
|
1520
1497
|
* @private
|
|
1521
1498
|
* 9.5 设置本地视频自定义渲染(Electron 平台下不可用)
|
|
@@ -1839,7 +1816,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1839
1816
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
1840
1817
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
1841
1818
|
*
|
|
1842
|
-
*
|
|
1819
|
+
* 注意:测速本身会消耗一定的流量,所以也会产生少量额外的流量费用。
|
|
1843
1820
|
*
|
|
1844
1821
|
* @param {Number} sdkAppId - 应用标识
|
|
1845
1822
|
* @param {String} userId - 用户标识
|
package/liteav/trtc.js
CHANGED
|
@@ -27,7 +27,6 @@ __exportStar(require("./trtc_define"), exports);
|
|
|
27
27
|
__exportStar(require("./trtc_code"), exports);
|
|
28
28
|
// 监听该事件,返回自定义视频渲染数据 ( bgra 格式)
|
|
29
29
|
const CUSTOM_VIDEO_DATA = 'onVideoData';
|
|
30
|
-
const SDK_LOG_LEVEL = 2;
|
|
31
30
|
let genSecFunc = function (instance, key) {
|
|
32
31
|
return function () {
|
|
33
32
|
let param = Array.from(arguments);
|
|
@@ -63,20 +62,7 @@ let secMethods = function (instance) {
|
|
|
63
62
|
copyMethods(instance);
|
|
64
63
|
copyPropMethods(instance);
|
|
65
64
|
};
|
|
66
|
-
let formatLogParams = function (params) {
|
|
67
|
-
let logParamsStr = '';
|
|
68
|
-
let paramsKeyList = Object.keys(params);
|
|
69
|
-
for (let i = 0; i < paramsKeyList.length; i++) {
|
|
70
|
-
const paramKey = paramsKeyList[i];
|
|
71
|
-
logParamsStr += `${paramKey}:${params[paramKey]}`;
|
|
72
|
-
if (i !== paramsKeyList.length - 1) {
|
|
73
|
-
logParamsStr += ',';
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
return logParamsStr;
|
|
77
|
-
};
|
|
78
65
|
let trtcCloudInstance = null;
|
|
79
|
-
let oriRtcCloud = null;
|
|
80
66
|
/**
|
|
81
67
|
* 腾讯云视频通话功能的主要接口类
|
|
82
68
|
*
|
|
@@ -92,10 +78,7 @@ let oriRtcCloud = null;
|
|
|
92
78
|
class TRTCCloud extends events_1.EventEmitter {
|
|
93
79
|
constructor() {
|
|
94
80
|
super();
|
|
95
|
-
|
|
96
|
-
this.rtcCloud = Object.assign({}, oriRtcCloud, {
|
|
97
|
-
onlineLog: undefined
|
|
98
|
-
});
|
|
81
|
+
this.rtcCloud = new trtc.NodeRTCCloud(pkg.version);
|
|
99
82
|
this.streams = new Map();
|
|
100
83
|
this.firstVideoFrameList = [];
|
|
101
84
|
this.playStreamType = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
@@ -396,13 +379,6 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
396
379
|
*/
|
|
397
380
|
handleOnEnterRoom(result) {
|
|
398
381
|
this.fire('onEnterRoom', result);
|
|
399
|
-
const params = {
|
|
400
|
-
js_version: pkg.version,
|
|
401
|
-
electron_version: process && process.versions && process.versions.electron || '',
|
|
402
|
-
arch: process && process.arch || '',
|
|
403
|
-
ua: window.navigator.userAgent
|
|
404
|
-
};
|
|
405
|
-
oriRtcCloud.onlineLog(result, SDK_LOG_LEVEL, '[trtc-electron-sdk] trtcstats', formatLogParams(params));
|
|
406
382
|
}
|
|
407
383
|
/**
|
|
408
384
|
* 2.2 退出房间的事件回调
|
|
@@ -500,15 +476,15 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
500
476
|
* @param {Number} reason - 离开原因,0表示用户主动退出房间,1表示用户超时退出,2表示被踢出房间。
|
|
501
477
|
*/
|
|
502
478
|
handleOnRemoteUserLeaveRoom(userId, reason) {
|
|
503
|
-
const streamTypeList = [
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
];
|
|
508
|
-
streamTypeList.forEach(streamType => {
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
});
|
|
479
|
+
// const streamTypeList = [
|
|
480
|
+
// TRTCVideoStreamType.TRTCVideoStreamTypeBig,
|
|
481
|
+
// TRTCVideoStreamType.TRTCVideoStreamTypeSub,
|
|
482
|
+
// TRTCVideoStreamType.TRTCVideoStreamTypeSmall
|
|
483
|
+
// ];
|
|
484
|
+
// streamTypeList.forEach(streamType => {
|
|
485
|
+
// const key = this.getKey(userId, streamType);
|
|
486
|
+
// this._destroyRender(key, null);
|
|
487
|
+
// });
|
|
512
488
|
this.fire('onRemoteUserLeaveRoom', userId, reason);
|
|
513
489
|
}
|
|
514
490
|
/**
|
|
@@ -1467,13 +1443,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1467
1443
|
}
|
|
1468
1444
|
if (view !== undefined) {
|
|
1469
1445
|
if (view !== null) {
|
|
1470
|
-
|
|
1471
|
-
if (bindStreamType === trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSmall) {
|
|
1472
|
-
// 如果拉取小流, 绑定 render 时也采用大流, 防止大小流切换后无法找到对应 render 进行渲染
|
|
1473
|
-
// 这里的逻辑和 _onRenderFrame 里, 获取 render 是不论小流还是大流, 都采用大流取获取 render 有关
|
|
1474
|
-
bindStreamType = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
1475
|
-
}
|
|
1476
|
-
const key = this.getKey(userId, bindStreamType);
|
|
1446
|
+
const key = this.getKey(userId, streamType);
|
|
1477
1447
|
this._initRender(key, view);
|
|
1478
1448
|
}
|
|
1479
1449
|
this.addRemoteVideoRenderCallback(userId);
|
|
@@ -2395,35 +2365,6 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2395
2365
|
setSubStreamMixVolume(volume) {
|
|
2396
2366
|
this.rtcCloud.setSubStreamMixVolume(volume);
|
|
2397
2367
|
}
|
|
2398
|
-
/**
|
|
2399
|
-
* 8.13 将指定窗口加入屏幕分享的排除列表中,加入排除列表中的窗口不会被分享出去
|
|
2400
|
-
*
|
|
2401
|
-
* 支持启动屏幕分享前设置过滤窗口,也支持屏幕分享过程中动态添加过滤窗口。
|
|
2402
|
-
*
|
|
2403
|
-
* @param {String} win - 不希望分享出去的窗口
|
|
2404
|
-
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
2405
|
-
* - Windows下该方法添加的窗口列表会在退房后清空;Mac下在退出房间时不会自动清空,需要调用一次removeAllExcludedShareWindow()方法清空列表。
|
|
2406
|
-
*/
|
|
2407
|
-
addExcludedShareWindow(win) {
|
|
2408
|
-
this.rtcCloud.addExcludedShareWindow(win);
|
|
2409
|
-
}
|
|
2410
|
-
/**
|
|
2411
|
-
* 8.14 将指定窗口从屏幕分享的排除列表中移除
|
|
2412
|
-
*
|
|
2413
|
-
* @param {String} win - 不希望分享出去的窗口
|
|
2414
|
-
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
2415
|
-
*/
|
|
2416
|
-
removeExcludedShareWindow(win) {
|
|
2417
|
-
this.rtcCloud.removeExcludedShareWindow(win);
|
|
2418
|
-
}
|
|
2419
|
-
/**
|
|
2420
|
-
* 8.15 将所有窗口从屏幕分享的排除列表中移除
|
|
2421
|
-
*
|
|
2422
|
-
* @note 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
2423
|
-
*/
|
|
2424
|
-
removeAllExcludedShareWindow() {
|
|
2425
|
-
this.rtcCloud.removeAllExcludedShareWindow();
|
|
2426
|
-
}
|
|
2427
2368
|
/////////////////////////////////////////////////////////////////////////////////
|
|
2428
2369
|
//
|
|
2429
2370
|
// (九)自定义采集和渲染
|
|
@@ -2909,7 +2850,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2909
2850
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
2910
2851
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
2911
2852
|
*
|
|
2912
|
-
*
|
|
2853
|
+
* 注意:测速本身会消耗一定的流量,所以也会产生少量额外的流量费用。
|
|
2913
2854
|
*
|
|
2914
2855
|
* @param {Number} sdkAppId - 应用标识
|
|
2915
2856
|
* @param {String} userId - 用户标识
|
|
@@ -2955,9 +2896,6 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2955
2896
|
let key = this.getKey('camera_device_test_view', trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig);
|
|
2956
2897
|
this._destroyRender(key, null);
|
|
2957
2898
|
this.rtcCloud.stopCameraDeviceTest();
|
|
2958
|
-
this.firstVideoFrameList = this.firstVideoFrameList.filter(function (item) {
|
|
2959
|
-
return !('' === item.uid && item.type === trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig);
|
|
2960
|
-
});
|
|
2961
2899
|
}
|
|
2962
2900
|
/**
|
|
2963
2901
|
* 13.5 开始进行麦克风测试
|
|
@@ -3168,6 +3106,9 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3168
3106
|
},
|
|
3169
3107
|
setParameter: (param) => {
|
|
3170
3108
|
return this.rtcCloud.setPluginParameter(pluginId, param);
|
|
3109
|
+
},
|
|
3110
|
+
getParameter: () => {
|
|
3111
|
+
return this.rtcCloud.getPluginParameter(pluginId);
|
|
3171
3112
|
}
|
|
3172
3113
|
};
|
|
3173
3114
|
}
|
|
@@ -3261,9 +3202,6 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3261
3202
|
});
|
|
3262
3203
|
// 画面不区分大小流,只区分主流和辅流(屏幕分享),这里统一使用主流当做 key
|
|
3263
3204
|
let streamType = type;
|
|
3264
|
-
if (streamType === trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSmall) {
|
|
3265
|
-
streamType = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
3266
|
-
}
|
|
3267
3205
|
this._onRealRender(uid, streamType, width, height, timestamp, rotation, data);
|
|
3268
3206
|
}
|
|
3269
3207
|
//回调远程给用户数据
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -119,7 +119,7 @@ export declare class TRTCImageBuffer {
|
|
|
119
119
|
length: number;
|
|
120
120
|
width: number;
|
|
121
121
|
height: number;
|
|
122
|
-
constructor(
|
|
122
|
+
constructor();
|
|
123
123
|
}
|
|
124
124
|
/**
|
|
125
125
|
* 3.5 屏幕采集源信息
|
|
@@ -129,7 +129,6 @@ export declare class TRTCImageBuffer {
|
|
|
129
129
|
* @param {String} sourceName - 采集源名称,UTF8编码
|
|
130
130
|
* @param {TRTCImageBuffer} thumbBGRA - 缩略图内容
|
|
131
131
|
* @param {TRTCImageBuffer} iconBGRA - 图标内容
|
|
132
|
-
* @param {Boolean} isMinimizeWindow - 是否最小化窗口
|
|
133
132
|
*
|
|
134
133
|
*/
|
|
135
134
|
export declare class TRTCScreenCaptureSourceInfo {
|
|
@@ -138,8 +137,7 @@ export declare class TRTCScreenCaptureSourceInfo {
|
|
|
138
137
|
sourceName: string;
|
|
139
138
|
thumbBGRA: TRTCImageBuffer;
|
|
140
139
|
iconBGRA: TRTCImageBuffer;
|
|
141
|
-
|
|
142
|
-
constructor(type?: TRTCScreenCaptureSourceType, sourceId?: string, sourceName?: string, thumbBGRA?: TRTCImageBuffer, iconBGRA?: TRTCImageBuffer, isMinimizeWindow?: boolean);
|
|
140
|
+
constructor();
|
|
143
141
|
}
|
|
144
142
|
/**
|
|
145
143
|
* 3.6 设备信息
|
|
@@ -151,7 +149,7 @@ export declare class TRTCScreenCaptureSourceInfo {
|
|
|
151
149
|
export declare class TRTCDeviceInfo {
|
|
152
150
|
deviceId: string;
|
|
153
151
|
deviceName: string;
|
|
154
|
-
constructor(
|
|
152
|
+
constructor();
|
|
155
153
|
}
|
|
156
154
|
/**
|
|
157
155
|
* 3.7 视频帧数据
|
|
@@ -177,7 +175,7 @@ export declare class TRTCVideoFrame {
|
|
|
177
175
|
height: number;
|
|
178
176
|
timestamp: number;
|
|
179
177
|
rotation: number;
|
|
180
|
-
constructor(
|
|
178
|
+
constructor();
|
|
181
179
|
}
|
|
182
180
|
export declare enum TRTCLogLevel {
|
|
183
181
|
TRTCLogLevelNone = 0,
|
|
@@ -215,10 +213,8 @@ export declare enum TRTCWaterMarkSrcType {
|
|
|
215
213
|
* 【推荐取值】如果一个用户在您的账号系统中的 ID 为“abc”,则 userId 即可设置为“abc”。<br>
|
|
216
214
|
* @param {String} userSig - 【字段含义】用户签名(必填),当前 userId 对应的验证签名,相当于登录密码。<br>
|
|
217
215
|
* 【推荐取值】请参考 [如何计算UserSig](https://cloud.tencent.com/document/product/647/17275)。<br>
|
|
218
|
-
* @param {Number} roomId - 【字段含义】房间号码(必填),指定房间号,在同一个房间里的用户(userId
|
|
216
|
+
* @param {Number} roomId - 【字段含义】房间号码(必填),指定房间号,在同一个房间里的用户(userId)可以彼此看到对方并进行视频通话。<br>
|
|
219
217
|
* 【推荐取值】您可以随意指定,但请不要重复,如果您的用户账号 ID 是数字类型的,可以直接用创建者的用户 ID 作为 roomId。<br>
|
|
220
|
-
* @param {String} strRoomId - 【字段含义】字符串房间号码(选填),roomId 和 strRoomId 必须填一个。若两者都填,则优先选择 roomId。<br>
|
|
221
|
-
* 【推荐取值】您可以随意指定,但请不要重复。<br>
|
|
222
218
|
* @param {TRTCRoleType} role - 【字段含义】直播场景下的角色,仅适用于直播场景(TRTCAppSceneLIVE 和 TRTCAppSceneVoiceChatRoom),视频通话场景下指定无效。<br>
|
|
223
219
|
* 【推荐取值】默认值:主播(TRTCRoleAnchor)<br>
|
|
224
220
|
* @param {String} privateMapKey - 【字段含义】房间签名(非必填),如果您希望某个房间只能让特定的某些 userId 进入,就需要使用 privateMapKey 进行权限保护。<br>
|
|
@@ -235,8 +231,8 @@ export declare enum TRTCWaterMarkSrcType {
|
|
|
235
231
|
*/
|
|
236
232
|
export declare class TRTCParams {
|
|
237
233
|
sdkAppId: number;
|
|
238
|
-
userId: string;
|
|
239
|
-
userSig: string;
|
|
234
|
+
userId: null | string;
|
|
235
|
+
userSig: null | string;
|
|
240
236
|
roomId: number;
|
|
241
237
|
strRoomId: string;
|
|
242
238
|
role: number;
|
|
@@ -244,7 +240,7 @@ export declare class TRTCParams {
|
|
|
244
240
|
businessInfo: null | string;
|
|
245
241
|
streamId: null | string;
|
|
246
242
|
userDefineRecordId: null | string;
|
|
247
|
-
constructor(
|
|
243
|
+
constructor();
|
|
248
244
|
}
|
|
249
245
|
/**
|
|
250
246
|
* 5.2 视频编码参数
|
|
@@ -285,12 +281,12 @@ export declare class TRTCParams {
|
|
|
285
281
|
*/
|
|
286
282
|
export declare class TRTCVideoEncParam {
|
|
287
283
|
videoResolution: TRTCVideoResolution;
|
|
288
|
-
resMode:
|
|
284
|
+
resMode: number;
|
|
289
285
|
videoFps: number;
|
|
290
286
|
videoBitrate: number;
|
|
291
287
|
minVideoBitrate: number;
|
|
292
288
|
enableAdjustRes: boolean;
|
|
293
|
-
constructor(
|
|
289
|
+
constructor();
|
|
294
290
|
}
|
|
295
291
|
/**
|
|
296
292
|
* 5.3 画面渲染参数
|
|
@@ -306,7 +302,7 @@ export declare class TRTCRenderParams {
|
|
|
306
302
|
rotation: TRTCVideoRotation;
|
|
307
303
|
fillMode: TRTCVideoFillMode;
|
|
308
304
|
mirrorType: TRTCVideoMirrorType;
|
|
309
|
-
constructor(
|
|
305
|
+
constructor();
|
|
310
306
|
}
|
|
311
307
|
/**
|
|
312
308
|
* 5.4 网络流控相关参数
|
|
@@ -325,9 +321,9 @@ export declare class TRTCRenderParams {
|
|
|
325
321
|
*
|
|
326
322
|
*/
|
|
327
323
|
export declare class TRTCNetworkQosParam {
|
|
328
|
-
preference:
|
|
329
|
-
controlMode:
|
|
330
|
-
constructor(
|
|
324
|
+
preference: number;
|
|
325
|
+
controlMode: number;
|
|
326
|
+
constructor();
|
|
331
327
|
}
|
|
332
328
|
/**
|
|
333
329
|
* 5.5 视频质量
|
|
@@ -339,9 +335,9 @@ export declare class TRTCNetworkQosParam {
|
|
|
339
335
|
*
|
|
340
336
|
*/
|
|
341
337
|
export declare class TRTCQualityInfo {
|
|
342
|
-
userId: string;
|
|
338
|
+
userId: null | string;
|
|
343
339
|
quality: TRTCQuality;
|
|
344
|
-
constructor(
|
|
340
|
+
constructor();
|
|
345
341
|
}
|
|
346
342
|
/**
|
|
347
343
|
* 5.6 音量大小
|
|
@@ -353,9 +349,9 @@ export declare class TRTCQualityInfo {
|
|
|
353
349
|
*
|
|
354
350
|
*/
|
|
355
351
|
export declare class TRTCVolumeInfo {
|
|
356
|
-
userId: string;
|
|
352
|
+
userId: null | string;
|
|
357
353
|
volume: number;
|
|
358
|
-
constructor(
|
|
354
|
+
constructor();
|
|
359
355
|
}
|
|
360
356
|
/**
|
|
361
357
|
* 5.8 网络测速结果
|
|
@@ -377,12 +373,12 @@ export declare class TRTCVolumeInfo {
|
|
|
377
373
|
*
|
|
378
374
|
*/
|
|
379
375
|
export declare class TRTCSpeedTestResult {
|
|
380
|
-
ip: string;
|
|
381
|
-
quality:
|
|
376
|
+
ip: null | string;
|
|
377
|
+
quality: number;
|
|
382
378
|
upLostRate: number;
|
|
383
379
|
downLostRate: number;
|
|
384
380
|
rtt: number;
|
|
385
|
-
constructor(
|
|
381
|
+
constructor();
|
|
386
382
|
}
|
|
387
383
|
/**
|
|
388
384
|
* 记录矩形的四个点坐标
|
|
@@ -423,8 +419,8 @@ export declare class TRTCMixUser {
|
|
|
423
419
|
rect: null | Rect;
|
|
424
420
|
zOrder: number;
|
|
425
421
|
pureAudio: boolean;
|
|
426
|
-
streamType:
|
|
427
|
-
constructor(
|
|
422
|
+
streamType: number;
|
|
423
|
+
constructor();
|
|
428
424
|
}
|
|
429
425
|
export declare enum TRTCTranscodingConfigMode {
|
|
430
426
|
TRTCTranscodingConfigMode_Unknown = 0,
|
|
@@ -478,7 +474,7 @@ export declare enum TRTCTranscodingConfigMode {
|
|
|
478
474
|
* 【推荐取值】默认值:'',即房间里的多路流会混合到该接口调用者的视频流上。
|
|
479
475
|
*/
|
|
480
476
|
export declare class TRTCTranscodingConfig {
|
|
481
|
-
mode:
|
|
477
|
+
mode: number;
|
|
482
478
|
appId: number;
|
|
483
479
|
bizId: number;
|
|
484
480
|
videoWidth: number;
|
|
@@ -486,14 +482,14 @@ export declare class TRTCTranscodingConfig {
|
|
|
486
482
|
videoBitrate: number;
|
|
487
483
|
videoFramerate: number;
|
|
488
484
|
videoGOP: number;
|
|
489
|
-
backgroundColor: number;
|
|
490
|
-
backgroundImage: string;
|
|
491
485
|
audioSampleRate: number;
|
|
492
486
|
audioBitrate: number;
|
|
493
487
|
audioChannels: number;
|
|
494
488
|
mixUsersArray: TRTCMixUser[];
|
|
489
|
+
backgroundColor: number;
|
|
490
|
+
backgroundImage: string;
|
|
495
491
|
streamId: string;
|
|
496
|
-
constructor(
|
|
492
|
+
constructor();
|
|
497
493
|
}
|
|
498
494
|
/**
|
|
499
495
|
* 5.12 CDN 旁路推流参数
|
|
@@ -507,7 +503,7 @@ export declare class TRTCPublishCDNParam {
|
|
|
507
503
|
appId: number;
|
|
508
504
|
bizId: number;
|
|
509
505
|
url: null | string;
|
|
510
|
-
constructor(
|
|
506
|
+
constructor();
|
|
511
507
|
}
|
|
512
508
|
/**
|
|
513
509
|
* 5.13 录音参数
|
|
@@ -520,7 +516,7 @@ export declare class TRTCPublishCDNParam {
|
|
|
520
516
|
*/
|
|
521
517
|
export declare class TRTCAudioRecordingParams {
|
|
522
518
|
filePath: null | string;
|
|
523
|
-
constructor(
|
|
519
|
+
constructor();
|
|
524
520
|
}
|
|
525
521
|
/**
|
|
526
522
|
* 5.14 音效
|
|
@@ -541,7 +537,7 @@ export declare class TRTCAudioEffectParam {
|
|
|
541
537
|
loopCount: number;
|
|
542
538
|
publish: boolean;
|
|
543
539
|
volume: number;
|
|
544
|
-
constructor(
|
|
540
|
+
constructor();
|
|
545
541
|
}
|
|
546
542
|
/**
|
|
547
543
|
* 本地的音视频统计信息
|
|
@@ -562,8 +558,8 @@ export declare class TRTCLocalStatistics {
|
|
|
562
558
|
videoBitrate: number;
|
|
563
559
|
audioSampleRate: number;
|
|
564
560
|
audioBitrate: number;
|
|
565
|
-
streamType:
|
|
566
|
-
constructor(
|
|
561
|
+
streamType: number;
|
|
562
|
+
constructor();
|
|
567
563
|
}
|
|
568
564
|
/**
|
|
569
565
|
* 远端成员的音视频统计信息
|
|
@@ -601,8 +597,8 @@ export declare class TRTCRemoteStatistics {
|
|
|
601
597
|
audioBlockRate: number;
|
|
602
598
|
videoTotalBlockTime: number;
|
|
603
599
|
videoBlockRate: number;
|
|
604
|
-
streamType:
|
|
605
|
-
constructor(
|
|
600
|
+
streamType: number;
|
|
601
|
+
constructor();
|
|
606
602
|
}
|
|
607
603
|
/**
|
|
608
604
|
* 统计数据
|
|
@@ -636,11 +632,11 @@ export declare class TRTCStatistics {
|
|
|
636
632
|
gatewayRtt: number;
|
|
637
633
|
receivedBytes: number;
|
|
638
634
|
sentBytes: number;
|
|
639
|
-
localStatisticsArray: TRTCLocalStatistics[];
|
|
635
|
+
localStatisticsArray: null | TRTCLocalStatistics[];
|
|
640
636
|
localStatisticsArraySize: number;
|
|
641
637
|
remoteStatisticsArray: TRTCRemoteStatistics[];
|
|
642
638
|
remoteStatisticsArraySize: number;
|
|
643
|
-
constructor(
|
|
639
|
+
constructor();
|
|
644
640
|
}
|
|
645
641
|
/**
|
|
646
642
|
* 音乐参数
|
|
@@ -662,7 +658,7 @@ export declare class AudioMusicParam {
|
|
|
662
658
|
isShortFile: boolean;
|
|
663
659
|
startTimeMS: number;
|
|
664
660
|
endTimeMS: number;
|
|
665
|
-
constructor(
|
|
661
|
+
constructor();
|
|
666
662
|
}
|
|
667
663
|
/**
|
|
668
664
|
* 房间切换参数
|
|
@@ -679,7 +675,7 @@ export declare class TRTCSwitchRoomParam {
|
|
|
679
675
|
strRoomId: string;
|
|
680
676
|
userSig: string;
|
|
681
677
|
privateMapKey: string;
|
|
682
|
-
constructor(
|
|
678
|
+
constructor();
|
|
683
679
|
}
|
|
684
680
|
export interface VideoFramePayload {
|
|
685
681
|
uid: string;
|
|
@@ -697,4 +693,5 @@ export interface PluginInfo {
|
|
|
697
693
|
enable: () => number;
|
|
698
694
|
disable: () => number;
|
|
699
695
|
setParameter: (param: string) => number;
|
|
696
|
+
getParameter: (paramKey: string) => string;
|
|
700
697
|
}
|
package/liteav/trtc_define.js
CHANGED
|
@@ -506,11 +506,11 @@ var TRTCAudioQuality;
|
|
|
506
506
|
*
|
|
507
507
|
*/
|
|
508
508
|
class TRTCImageBuffer {
|
|
509
|
-
constructor(
|
|
510
|
-
this.buffer =
|
|
511
|
-
this.length =
|
|
512
|
-
this.width =
|
|
513
|
-
this.height =
|
|
509
|
+
constructor() {
|
|
510
|
+
this.buffer = new ArrayBuffer(0);
|
|
511
|
+
this.length = 0;
|
|
512
|
+
this.width = 0;
|
|
513
|
+
this.height = 0;
|
|
514
514
|
}
|
|
515
515
|
}
|
|
516
516
|
exports.TRTCImageBuffer = TRTCImageBuffer;
|
|
@@ -523,17 +523,15 @@ exports.TRTCImageBuffer = TRTCImageBuffer;
|
|
|
523
523
|
* @param {String} sourceName - 采集源名称,UTF8编码
|
|
524
524
|
* @param {TRTCImageBuffer} thumbBGRA - 缩略图内容
|
|
525
525
|
* @param {TRTCImageBuffer} iconBGRA - 图标内容
|
|
526
|
-
* @param {Boolean} isMinimizeWindow - 是否最小化窗口
|
|
527
526
|
*
|
|
528
527
|
*/
|
|
529
528
|
class TRTCScreenCaptureSourceInfo {
|
|
530
|
-
constructor(
|
|
531
|
-
this.type =
|
|
532
|
-
this.sourceId =
|
|
533
|
-
this.sourceName =
|
|
534
|
-
this.thumbBGRA =
|
|
535
|
-
this.iconBGRA =
|
|
536
|
-
this.isMinimizeWindow = isMinimizeWindow;
|
|
529
|
+
constructor() {
|
|
530
|
+
this.type = TRTCScreenCaptureSourceType.TRTCScreenCaptureSourceTypeUnknown;
|
|
531
|
+
this.sourceId = '';
|
|
532
|
+
this.sourceName = '';
|
|
533
|
+
this.thumbBGRA = new TRTCImageBuffer();
|
|
534
|
+
this.iconBGRA = new TRTCImageBuffer();
|
|
537
535
|
}
|
|
538
536
|
}
|
|
539
537
|
exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
|
|
@@ -546,9 +544,9 @@ exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
|
|
|
546
544
|
*
|
|
547
545
|
*/
|
|
548
546
|
class TRTCDeviceInfo {
|
|
549
|
-
constructor(
|
|
550
|
-
this.deviceId =
|
|
551
|
-
this.deviceName =
|
|
547
|
+
constructor() {
|
|
548
|
+
this.deviceId = '';
|
|
549
|
+
this.deviceName = '';
|
|
552
550
|
}
|
|
553
551
|
}
|
|
554
552
|
exports.TRTCDeviceInfo = TRTCDeviceInfo;
|
|
@@ -568,16 +566,16 @@ exports.TRTCDeviceInfo = TRTCDeviceInfo;
|
|
|
568
566
|
*
|
|
569
567
|
*/
|
|
570
568
|
class TRTCVideoFrame {
|
|
571
|
-
constructor(
|
|
572
|
-
this.videoFormat =
|
|
573
|
-
this.bufferType =
|
|
574
|
-
this.data =
|
|
575
|
-
this.textureId =
|
|
576
|
-
this.length =
|
|
577
|
-
this.width =
|
|
578
|
-
this.height =
|
|
579
|
-
this.timestamp =
|
|
580
|
-
this.rotation =
|
|
569
|
+
constructor() {
|
|
570
|
+
this.videoFormat = TRTCVideoPixelFormat.TRTCVideoPixelFormat_Unknown;
|
|
571
|
+
this.bufferType = TRTCVideoBufferType.TRTCVideoBufferType_Unknown;
|
|
572
|
+
this.data = null;
|
|
573
|
+
this.textureId = 0;
|
|
574
|
+
this.length = 0;
|
|
575
|
+
this.width = 0;
|
|
576
|
+
this.height = 0;
|
|
577
|
+
this.timestamp = 0;
|
|
578
|
+
this.rotation = 0;
|
|
581
579
|
}
|
|
582
580
|
}
|
|
583
581
|
exports.TRTCVideoFrame = TRTCVideoFrame;
|
|
@@ -702,10 +700,8 @@ var TRTCWaterMarkSrcType;
|
|
|
702
700
|
* 【推荐取值】如果一个用户在您的账号系统中的 ID 为“abc”,则 userId 即可设置为“abc”。<br>
|
|
703
701
|
* @param {String} userSig - 【字段含义】用户签名(必填),当前 userId 对应的验证签名,相当于登录密码。<br>
|
|
704
702
|
* 【推荐取值】请参考 [如何计算UserSig](https://cloud.tencent.com/document/product/647/17275)。<br>
|
|
705
|
-
* @param {Number} roomId - 【字段含义】房间号码(必填),指定房间号,在同一个房间里的用户(userId
|
|
703
|
+
* @param {Number} roomId - 【字段含义】房间号码(必填),指定房间号,在同一个房间里的用户(userId)可以彼此看到对方并进行视频通话。<br>
|
|
706
704
|
* 【推荐取值】您可以随意指定,但请不要重复,如果您的用户账号 ID 是数字类型的,可以直接用创建者的用户 ID 作为 roomId。<br>
|
|
707
|
-
* @param {String} strRoomId - 【字段含义】字符串房间号码(选填),roomId 和 strRoomId 必须填一个。若两者都填,则优先选择 roomId。<br>
|
|
708
|
-
* 【推荐取值】您可以随意指定,但请不要重复。<br>
|
|
709
705
|
* @param {TRTCRoleType} role - 【字段含义】直播场景下的角色,仅适用于直播场景(TRTCAppSceneLIVE 和 TRTCAppSceneVoiceChatRoom),视频通话场景下指定无效。<br>
|
|
710
706
|
* 【推荐取值】默认值:主播(TRTCRoleAnchor)<br>
|
|
711
707
|
* @param {String} privateMapKey - 【字段含义】房间签名(非必填),如果您希望某个房间只能让特定的某些 userId 进入,就需要使用 privateMapKey 进行权限保护。<br>
|
|
@@ -721,17 +717,17 @@ var TRTCWaterMarkSrcType;
|
|
|
721
717
|
* 【参考文档】[云端录制](https://cloud.tencent.com/document/product/647/16823)。
|
|
722
718
|
*/
|
|
723
719
|
class TRTCParams {
|
|
724
|
-
constructor(
|
|
725
|
-
this.sdkAppId =
|
|
726
|
-
this.userId =
|
|
727
|
-
this.userSig =
|
|
728
|
-
this.roomId =
|
|
729
|
-
this.strRoomId =
|
|
730
|
-
this.role =
|
|
731
|
-
this.privateMapKey =
|
|
732
|
-
this.businessInfo =
|
|
733
|
-
this.streamId =
|
|
734
|
-
this.userDefineRecordId =
|
|
720
|
+
constructor() {
|
|
721
|
+
this.sdkAppId = 0;
|
|
722
|
+
this.userId = null;
|
|
723
|
+
this.userSig = null;
|
|
724
|
+
this.roomId = 0;
|
|
725
|
+
this.strRoomId = '';
|
|
726
|
+
this.role = TRTCRoleType.TRTCRoleAnchor;
|
|
727
|
+
this.privateMapKey = null;
|
|
728
|
+
this.businessInfo = null;
|
|
729
|
+
this.streamId = null;
|
|
730
|
+
this.userDefineRecordId = null;
|
|
735
731
|
}
|
|
736
732
|
}
|
|
737
733
|
exports.TRTCParams = TRTCParams;
|
|
@@ -774,13 +770,13 @@ exports.TRTCParams = TRTCParams;
|
|
|
774
770
|
* 【特别说明】若有录制需求,选择 YES 时,请确保通话过程中,调整分辨率不会影响您的录制效果。<br>
|
|
775
771
|
*/
|
|
776
772
|
class TRTCVideoEncParam {
|
|
777
|
-
constructor(
|
|
778
|
-
this.videoResolution =
|
|
779
|
-
this.resMode =
|
|
780
|
-
this.videoFps =
|
|
781
|
-
this.videoBitrate =
|
|
782
|
-
this.minVideoBitrate =
|
|
783
|
-
this.enableAdjustRes =
|
|
773
|
+
constructor() {
|
|
774
|
+
this.videoResolution = TRTCVideoResolution.TRTCVideoResolution_640_360;
|
|
775
|
+
this.resMode = TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape;
|
|
776
|
+
this.videoFps = 15;
|
|
777
|
+
this.videoBitrate = 550;
|
|
778
|
+
this.minVideoBitrate = 0;
|
|
779
|
+
this.enableAdjustRes = false;
|
|
784
780
|
}
|
|
785
781
|
}
|
|
786
782
|
exports.TRTCVideoEncParam = TRTCVideoEncParam;
|
|
@@ -796,10 +792,10 @@ exports.TRTCVideoEncParam = TRTCVideoEncParam;
|
|
|
796
792
|
*
|
|
797
793
|
*/
|
|
798
794
|
class TRTCRenderParams {
|
|
799
|
-
constructor(
|
|
800
|
-
this.rotation =
|
|
801
|
-
this.fillMode =
|
|
802
|
-
this.mirrorType =
|
|
795
|
+
constructor() {
|
|
796
|
+
this.rotation = TRTCVideoRotation.TRTCVideoRotation0;
|
|
797
|
+
this.fillMode = TRTCVideoFillMode.TRTCVideoFillMode_Fit;
|
|
798
|
+
this.mirrorType = TRTCVideoMirrorType.TRTCVideoMirrorType_Disable;
|
|
803
799
|
}
|
|
804
800
|
}
|
|
805
801
|
exports.TRTCRenderParams = TRTCRenderParams;
|
|
@@ -820,9 +816,9 @@ exports.TRTCRenderParams = TRTCRenderParams;
|
|
|
820
816
|
*
|
|
821
817
|
*/
|
|
822
818
|
class TRTCNetworkQosParam {
|
|
823
|
-
constructor(
|
|
824
|
-
this.preference =
|
|
825
|
-
this.controlMode =
|
|
819
|
+
constructor() {
|
|
820
|
+
this.preference = TRTCVideoQosPreference.TRTCVideoQosPreferenceClear;
|
|
821
|
+
this.controlMode = TRTCQosControlMode.TRTCQosControlModeServer;
|
|
826
822
|
}
|
|
827
823
|
}
|
|
828
824
|
exports.TRTCNetworkQosParam = TRTCNetworkQosParam;
|
|
@@ -837,9 +833,9 @@ exports.TRTCNetworkQosParam = TRTCNetworkQosParam;
|
|
|
837
833
|
*
|
|
838
834
|
*/
|
|
839
835
|
class TRTCQualityInfo {
|
|
840
|
-
constructor(
|
|
841
|
-
this.userId =
|
|
842
|
-
this.quality =
|
|
836
|
+
constructor() {
|
|
837
|
+
this.userId = null;
|
|
838
|
+
this.quality = TRTCQuality.TRTCQuality_Unknown;
|
|
843
839
|
}
|
|
844
840
|
}
|
|
845
841
|
exports.TRTCQualityInfo = TRTCQualityInfo;
|
|
@@ -854,9 +850,9 @@ exports.TRTCQualityInfo = TRTCQualityInfo;
|
|
|
854
850
|
*
|
|
855
851
|
*/
|
|
856
852
|
class TRTCVolumeInfo {
|
|
857
|
-
constructor(
|
|
858
|
-
this.userId =
|
|
859
|
-
this.volume =
|
|
853
|
+
constructor() {
|
|
854
|
+
this.userId = null;
|
|
855
|
+
this.volume = 0;
|
|
860
856
|
}
|
|
861
857
|
}
|
|
862
858
|
exports.TRTCVolumeInfo = TRTCVolumeInfo;
|
|
@@ -881,12 +877,12 @@ exports.TRTCVolumeInfo = TRTCVolumeInfo;
|
|
|
881
877
|
*
|
|
882
878
|
*/
|
|
883
879
|
class TRTCSpeedTestResult {
|
|
884
|
-
constructor(
|
|
885
|
-
this.ip =
|
|
886
|
-
this.quality =
|
|
887
|
-
this.upLostRate =
|
|
888
|
-
this.downLostRate =
|
|
889
|
-
this.rtt =
|
|
880
|
+
constructor() {
|
|
881
|
+
this.ip = null;
|
|
882
|
+
this.quality = TRTCQuality.TRTCQuality_Unknown;
|
|
883
|
+
this.upLostRate = 0.0;
|
|
884
|
+
this.downLostRate = 0.0;
|
|
885
|
+
this.rtt = 0;
|
|
890
886
|
}
|
|
891
887
|
}
|
|
892
888
|
exports.TRTCSpeedTestResult = TRTCSpeedTestResult;
|
|
@@ -928,13 +924,13 @@ exports.Rect = Rect;
|
|
|
928
924
|
*
|
|
929
925
|
*/
|
|
930
926
|
class TRTCMixUser {
|
|
931
|
-
constructor(
|
|
932
|
-
this.userId =
|
|
933
|
-
this.roomId =
|
|
934
|
-
this.rect =
|
|
935
|
-
this.zOrder =
|
|
936
|
-
this.pureAudio =
|
|
937
|
-
this.streamType =
|
|
927
|
+
constructor() {
|
|
928
|
+
this.userId = '';
|
|
929
|
+
this.roomId = '';
|
|
930
|
+
this.rect = null;
|
|
931
|
+
this.zOrder = 0;
|
|
932
|
+
this.pureAudio = false;
|
|
933
|
+
this.streamType = TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
938
934
|
}
|
|
939
935
|
}
|
|
940
936
|
exports.TRTCMixUser = TRTCMixUser;
|
|
@@ -1038,22 +1034,22 @@ var TRTCTranscodingConfigMode;
|
|
|
1038
1034
|
* 【推荐取值】默认值:'',即房间里的多路流会混合到该接口调用者的视频流上。
|
|
1039
1035
|
*/
|
|
1040
1036
|
class TRTCTranscodingConfig {
|
|
1041
|
-
constructor(
|
|
1042
|
-
this.mode =
|
|
1043
|
-
this.appId =
|
|
1044
|
-
this.bizId =
|
|
1045
|
-
this.videoWidth =
|
|
1046
|
-
this.videoHeight =
|
|
1047
|
-
this.videoBitrate =
|
|
1048
|
-
this.videoFramerate =
|
|
1049
|
-
this.videoGOP =
|
|
1050
|
-
this.
|
|
1051
|
-
this.
|
|
1052
|
-
this.
|
|
1053
|
-
this.
|
|
1054
|
-
this.
|
|
1055
|
-
this.
|
|
1056
|
-
this.streamId =
|
|
1037
|
+
constructor() {
|
|
1038
|
+
this.mode = TRTCTranscodingConfigMode.TRTCTranscodingConfigMode_Unknown;
|
|
1039
|
+
this.appId = 0;
|
|
1040
|
+
this.bizId = 0;
|
|
1041
|
+
this.videoWidth = 0;
|
|
1042
|
+
this.videoHeight = 0;
|
|
1043
|
+
this.videoBitrate = 0;
|
|
1044
|
+
this.videoFramerate = 15;
|
|
1045
|
+
this.videoGOP = 2;
|
|
1046
|
+
this.audioSampleRate = 64;
|
|
1047
|
+
this.audioBitrate = 48000;
|
|
1048
|
+
this.audioChannels = 1;
|
|
1049
|
+
this.mixUsersArray = [];
|
|
1050
|
+
this.backgroundColor = 0;
|
|
1051
|
+
this.backgroundImage = '';
|
|
1052
|
+
this.streamId = '';
|
|
1057
1053
|
}
|
|
1058
1054
|
}
|
|
1059
1055
|
exports.TRTCTranscodingConfig = TRTCTranscodingConfig;
|
|
@@ -1067,10 +1063,10 @@ exports.TRTCTranscodingConfig = TRTCTranscodingConfig;
|
|
|
1067
1063
|
*
|
|
1068
1064
|
*/
|
|
1069
1065
|
class TRTCPublishCDNParam {
|
|
1070
|
-
constructor(
|
|
1071
|
-
this.appId =
|
|
1072
|
-
this.bizId =
|
|
1073
|
-
this.url =
|
|
1066
|
+
constructor() {
|
|
1067
|
+
this.appId = 0;
|
|
1068
|
+
this.bizId = 0;
|
|
1069
|
+
this.url = null;
|
|
1074
1070
|
}
|
|
1075
1071
|
}
|
|
1076
1072
|
exports.TRTCPublishCDNParam = TRTCPublishCDNParam;
|
|
@@ -1085,8 +1081,8 @@ exports.TRTCPublishCDNParam = TRTCPublishCDNParam;
|
|
|
1085
1081
|
*
|
|
1086
1082
|
*/
|
|
1087
1083
|
class TRTCAudioRecordingParams {
|
|
1088
|
-
constructor(
|
|
1089
|
-
this.filePath =
|
|
1084
|
+
constructor() {
|
|
1085
|
+
this.filePath = null;
|
|
1090
1086
|
}
|
|
1091
1087
|
}
|
|
1092
1088
|
exports.TRTCAudioRecordingParams = TRTCAudioRecordingParams;
|
|
@@ -1105,12 +1101,12 @@ exports.TRTCAudioRecordingParams = TRTCAudioRecordingParams;
|
|
|
1105
1101
|
* 【推荐取值】取值范围为0 - 100;默认值:100
|
|
1106
1102
|
*/
|
|
1107
1103
|
class TRTCAudioEffectParam {
|
|
1108
|
-
constructor(
|
|
1109
|
-
this.effectId =
|
|
1110
|
-
this.path =
|
|
1111
|
-
this.loopCount =
|
|
1112
|
-
this.publish =
|
|
1113
|
-
this.volume =
|
|
1104
|
+
constructor() {
|
|
1105
|
+
this.effectId = 0;
|
|
1106
|
+
this.path = '';
|
|
1107
|
+
this.loopCount = 0;
|
|
1108
|
+
this.publish = false;
|
|
1109
|
+
this.volume = 100;
|
|
1114
1110
|
}
|
|
1115
1111
|
}
|
|
1116
1112
|
exports.TRTCAudioEffectParam = TRTCAudioEffectParam;
|
|
@@ -1128,14 +1124,14 @@ exports.TRTCAudioEffectParam = TRTCAudioEffectParam;
|
|
|
1128
1124
|
*
|
|
1129
1125
|
*/
|
|
1130
1126
|
class TRTCLocalStatistics {
|
|
1131
|
-
constructor(
|
|
1132
|
-
this.width =
|
|
1133
|
-
this.height =
|
|
1134
|
-
this.frameRate =
|
|
1135
|
-
this.videoBitrate =
|
|
1136
|
-
this.audioSampleRate =
|
|
1137
|
-
this.audioBitrate =
|
|
1138
|
-
this.streamType =
|
|
1127
|
+
constructor() {
|
|
1128
|
+
this.width = 0;
|
|
1129
|
+
this.height = 0;
|
|
1130
|
+
this.frameRate = 0;
|
|
1131
|
+
this.videoBitrate = 0;
|
|
1132
|
+
this.audioSampleRate = 0;
|
|
1133
|
+
this.audioBitrate = 0;
|
|
1134
|
+
this.streamType = TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
1139
1135
|
}
|
|
1140
1136
|
}
|
|
1141
1137
|
exports.TRTCLocalStatistics = TRTCLocalStatistics;
|
|
@@ -1163,21 +1159,21 @@ exports.TRTCLocalStatistics = TRTCLocalStatistics;
|
|
|
1163
1159
|
*
|
|
1164
1160
|
*/
|
|
1165
1161
|
class TRTCRemoteStatistics {
|
|
1166
|
-
constructor(
|
|
1167
|
-
this.userId =
|
|
1168
|
-
this.finalLoss =
|
|
1169
|
-
this.width =
|
|
1170
|
-
this.height =
|
|
1171
|
-
this.frameRate =
|
|
1172
|
-
this.videoBitrate =
|
|
1173
|
-
this.audioSampleRate =
|
|
1174
|
-
this.audioBitrate =
|
|
1175
|
-
this.jitterBufferDelay =
|
|
1176
|
-
this.audioTotalBlockTime =
|
|
1177
|
-
this.audioBlockRate =
|
|
1178
|
-
this.videoTotalBlockTime =
|
|
1179
|
-
this.videoBlockRate =
|
|
1180
|
-
this.streamType =
|
|
1162
|
+
constructor() {
|
|
1163
|
+
this.userId = '';
|
|
1164
|
+
this.finalLoss = 0;
|
|
1165
|
+
this.width = 0;
|
|
1166
|
+
this.height = 0;
|
|
1167
|
+
this.frameRate = 0;
|
|
1168
|
+
this.videoBitrate = 0;
|
|
1169
|
+
this.audioSampleRate = 0;
|
|
1170
|
+
this.audioBitrate = 0;
|
|
1171
|
+
this.jitterBufferDelay = 0;
|
|
1172
|
+
this.audioTotalBlockTime = 0;
|
|
1173
|
+
this.audioBlockRate = 0;
|
|
1174
|
+
this.videoTotalBlockTime = 0;
|
|
1175
|
+
this.videoBlockRate = 0;
|
|
1176
|
+
this.streamType = TRTCVideoStreamType.TRTCVideoStreamTypeBig;
|
|
1181
1177
|
}
|
|
1182
1178
|
}
|
|
1183
1179
|
exports.TRTCRemoteStatistics = TRTCRemoteStatistics;
|
|
@@ -1206,19 +1202,19 @@ exports.TRTCRemoteStatistics = TRTCRemoteStatistics;
|
|
|
1206
1202
|
*
|
|
1207
1203
|
*/
|
|
1208
1204
|
class TRTCStatistics {
|
|
1209
|
-
constructor(
|
|
1210
|
-
this.upLoss =
|
|
1211
|
-
this.downLoss =
|
|
1212
|
-
this.appCpu =
|
|
1213
|
-
this.systemCpu =
|
|
1214
|
-
this.rtt =
|
|
1215
|
-
this.gatewayRtt =
|
|
1216
|
-
this.receivedBytes =
|
|
1217
|
-
this.sentBytes =
|
|
1218
|
-
this.localStatisticsArray =
|
|
1219
|
-
this.localStatisticsArraySize =
|
|
1220
|
-
this.remoteStatisticsArray =
|
|
1221
|
-
this.remoteStatisticsArraySize =
|
|
1205
|
+
constructor() {
|
|
1206
|
+
this.upLoss = 0;
|
|
1207
|
+
this.downLoss = 0;
|
|
1208
|
+
this.appCpu = 0;
|
|
1209
|
+
this.systemCpu = 0;
|
|
1210
|
+
this.rtt = 0;
|
|
1211
|
+
this.gatewayRtt = 0;
|
|
1212
|
+
this.receivedBytes = 0;
|
|
1213
|
+
this.sentBytes = 0;
|
|
1214
|
+
this.localStatisticsArray = null;
|
|
1215
|
+
this.localStatisticsArraySize = 0;
|
|
1216
|
+
this.remoteStatisticsArray = [];
|
|
1217
|
+
this.remoteStatisticsArraySize = 0;
|
|
1222
1218
|
}
|
|
1223
1219
|
}
|
|
1224
1220
|
exports.TRTCStatistics = TRTCStatistics;
|
|
@@ -1236,14 +1232,14 @@ exports.TRTCStatistics = TRTCStatistics;
|
|
|
1236
1232
|
*
|
|
1237
1233
|
*/
|
|
1238
1234
|
class AudioMusicParam {
|
|
1239
|
-
constructor(
|
|
1240
|
-
this.id =
|
|
1241
|
-
this.path =
|
|
1242
|
-
this.loopCount =
|
|
1243
|
-
this.publish =
|
|
1244
|
-
this.isShortFile =
|
|
1245
|
-
this.startTimeMS =
|
|
1246
|
-
this.endTimeMS =
|
|
1235
|
+
constructor() {
|
|
1236
|
+
this.id = 0;
|
|
1237
|
+
this.path = '';
|
|
1238
|
+
this.loopCount = 0;
|
|
1239
|
+
this.publish = true;
|
|
1240
|
+
this.isShortFile = false;
|
|
1241
|
+
this.startTimeMS = 0;
|
|
1242
|
+
this.endTimeMS = 0;
|
|
1247
1243
|
}
|
|
1248
1244
|
}
|
|
1249
1245
|
exports.AudioMusicParam = AudioMusicParam;
|
|
@@ -1258,11 +1254,11 @@ exports.AudioMusicParam = AudioMusicParam;
|
|
|
1258
1254
|
*
|
|
1259
1255
|
*/
|
|
1260
1256
|
class TRTCSwitchRoomParam {
|
|
1261
|
-
constructor(
|
|
1262
|
-
this.roomId =
|
|
1263
|
-
this.strRoomId =
|
|
1264
|
-
this.userSig =
|
|
1265
|
-
this.privateMapKey =
|
|
1257
|
+
constructor() {
|
|
1258
|
+
this.roomId = 0;
|
|
1259
|
+
this.strRoomId = '';
|
|
1260
|
+
this.userSig = '';
|
|
1261
|
+
this.privateMapKey = '';
|
|
1266
1262
|
}
|
|
1267
1263
|
}
|
|
1268
1264
|
exports.TRTCSwitchRoomParam = TRTCSwitchRoomParam;
|
package/package.json
CHANGED
package/scripts/publish-doc.js
CHANGED
|
@@ -34,7 +34,7 @@ const cos = new COS({
|
|
|
34
34
|
|
|
35
35
|
const bucket = 'sdk-web-1252463788';
|
|
36
36
|
const region = 'ap-hongkong';
|
|
37
|
-
const keyPrefix = 'trtc/electron/doc/zh-cn/trtc_electron_sdk
|
|
37
|
+
const keyPrefix = 'trtc/electron/doc/zh-cn/trtc_electron_sdk';
|
|
38
38
|
const docPath = path.join(__dirname, '../_doc');
|
|
39
39
|
|
|
40
40
|
function walkSync(dir, filelist) {
|