trtc-electron-sdk 9.3.8-beta.0 → 9.3.105-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 +26 -3
- package/liteav/trtc.js +32 -8
- package/liteav/trtc_define.d.ts +5 -2
- package/liteav/trtc_define.js +5 -1
- package/package.json +1 -1
package/liteav/trtc.d.ts
CHANGED
|
@@ -793,6 +793,8 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
793
793
|
*
|
|
794
794
|
* 参考文档:[云端混流转码](https://cloud.tencent.com/document/product/647/16827)。
|
|
795
795
|
*
|
|
796
|
+
* 注意:混流转码为收费功能,调用接口将产生云端混流转码费用,详见 [云端混流转码计费说明](https://cloud.tencent.com/document/product/647/49446)。
|
|
797
|
+
*
|
|
796
798
|
* @note 关于云端混流的注意事项:
|
|
797
799
|
* - 云端转码会引入一定的 CDN 观看延时,大概会增加1 - 2秒。
|
|
798
800
|
* - 调用该函数的用户,会将连麦中的多路画面混合到自己当前这路画面中。
|
|
@@ -1444,7 +1446,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1444
1446
|
*/
|
|
1445
1447
|
selectScreenCaptureTarget(type: number, sourceId: string, sourcename: string, captureRect: Rect, captureMouse: boolean, highlightWindow: boolean): any;
|
|
1446
1448
|
/**
|
|
1447
|
-
* 8.7
|
|
1449
|
+
* 8.7 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。
|
|
1448
1450
|
*
|
|
1449
1451
|
* 注意:
|
|
1450
1452
|
* 一个用户同时最多只能上传一条主路(TRTCVideoStreamTypeBig)画面和一条辅路(TRTCVideoStreamTypeSub)画面,
|
|
@@ -1516,6 +1518,28 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1516
1518
|
* @note 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeScreen 时生效,即分享屏幕时生效
|
|
1517
1519
|
*/
|
|
1518
1520
|
removeAllExcludedShareWindow(): void;
|
|
1521
|
+
/**
|
|
1522
|
+
* 8.16 将指定窗口加入屏幕分享的包含列表中(该接口仅支持桌面系统)
|
|
1523
|
+
*
|
|
1524
|
+
* @param {String} win - 希望被分享出去的窗口(Windows 平台下为窗口句柄: HWND)
|
|
1525
|
+
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
1526
|
+
* - 您在 startScreenCapture 之前和之后调用均可。
|
|
1527
|
+
* - 通过该方法添加到包含列表中的窗口,会在退出房间后被 SDK 自动清除。
|
|
1528
|
+
*/
|
|
1529
|
+
addIncludedShareWindow(win: string): void;
|
|
1530
|
+
/**
|
|
1531
|
+
* 8.17 将指定窗口从屏幕分享的包含列表中移除(该接口仅支持桌面系统)
|
|
1532
|
+
*
|
|
1533
|
+
* @param {String} win - 希望被分享出去的窗口(Mac 平台: 窗口 ID;Windows 平台: HWND)
|
|
1534
|
+
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
1535
|
+
*/
|
|
1536
|
+
removeIncludedShareWindow(win: string): void;
|
|
1537
|
+
/**
|
|
1538
|
+
* 8.18 将全部窗口从屏幕分享的包含列表中移除(该接口仅支持桌面系统)
|
|
1539
|
+
*
|
|
1540
|
+
* @note 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
1541
|
+
*/
|
|
1542
|
+
removeAllIncludedShareWindow(): void;
|
|
1519
1543
|
/**
|
|
1520
1544
|
* @private
|
|
1521
1545
|
* 9.5 设置本地视频自定义渲染(Electron 平台下不可用)
|
|
@@ -1839,7 +1863,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1839
1863
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
1840
1864
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
1841
1865
|
*
|
|
1842
|
-
*
|
|
1866
|
+
* 注意:测速过程将产生少量的基础服务费用,详见 [计费概述 > 基础服务](https://cloud.tencent.com/document/product/647/17157#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1) 文档说明。
|
|
1843
1867
|
*
|
|
1844
1868
|
* @param {Number} sdkAppId - 应用标识
|
|
1845
1869
|
* @param {String} userId - 用户标识
|
|
@@ -1975,7 +1999,6 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1975
1999
|
removePlugin(id: string): void;
|
|
1976
2000
|
getPluginList(): PluginInfo[];
|
|
1977
2001
|
createPlugin(pluginId: string): PluginInfo;
|
|
1978
|
-
setPluginCallback(pluginCb: (pluginId: string, errorCode: number, msg: string) => void): void;
|
|
1979
2002
|
getKey(uid: string, type: TRTCVideoStreamType): string;
|
|
1980
2003
|
/**
|
|
1981
2004
|
* 判断是否支持webGL
|
package/liteav/trtc.js
CHANGED
|
@@ -1335,6 +1335,8 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1335
1335
|
*
|
|
1336
1336
|
* 参考文档:[云端混流转码](https://cloud.tencent.com/document/product/647/16827)。
|
|
1337
1337
|
*
|
|
1338
|
+
* 注意:混流转码为收费功能,调用接口将产生云端混流转码费用,详见 [云端混流转码计费说明](https://cloud.tencent.com/document/product/647/49446)。
|
|
1339
|
+
*
|
|
1338
1340
|
* @note 关于云端混流的注意事项:
|
|
1339
1341
|
* - 云端转码会引入一定的 CDN 观看延时,大概会增加1 - 2秒。
|
|
1340
1342
|
* - 调用该函数的用户,会将连麦中的多路画面混合到自己当前这路画面中。
|
|
@@ -2308,7 +2310,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2308
2310
|
}
|
|
2309
2311
|
}
|
|
2310
2312
|
/**
|
|
2311
|
-
* 8.7
|
|
2313
|
+
* 8.7 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。
|
|
2312
2314
|
*
|
|
2313
2315
|
* 注意:
|
|
2314
2316
|
* 一个用户同时最多只能上传一条主路(TRTCVideoStreamTypeBig)画面和一条辅路(TRTCVideoStreamTypeSub)画面,
|
|
@@ -2424,6 +2426,34 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2424
2426
|
removeAllExcludedShareWindow() {
|
|
2425
2427
|
this.rtcCloud.removeAllExcludedShareWindow();
|
|
2426
2428
|
}
|
|
2429
|
+
/**
|
|
2430
|
+
* 8.16 将指定窗口加入屏幕分享的包含列表中(该接口仅支持桌面系统)
|
|
2431
|
+
*
|
|
2432
|
+
* @param {String} win - 希望被分享出去的窗口(Windows 平台下为窗口句柄: HWND)
|
|
2433
|
+
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
2434
|
+
* - 您在 startScreenCapture 之前和之后调用均可。
|
|
2435
|
+
* - 通过该方法添加到包含列表中的窗口,会在退出房间后被 SDK 自动清除。
|
|
2436
|
+
*/
|
|
2437
|
+
addIncludedShareWindow(win) {
|
|
2438
|
+
this.rtcCloud.addIncludedShareWindow(win);
|
|
2439
|
+
}
|
|
2440
|
+
/**
|
|
2441
|
+
* 8.17 将指定窗口从屏幕分享的包含列表中移除(该接口仅支持桌面系统)
|
|
2442
|
+
*
|
|
2443
|
+
* @param {String} win - 希望被分享出去的窗口(Mac 平台: 窗口 ID;Windows 平台: HWND)
|
|
2444
|
+
* - 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
2445
|
+
*/
|
|
2446
|
+
removeIncludedShareWindow(win) {
|
|
2447
|
+
this.rtcCloud.removeIncludedShareWindow(win);
|
|
2448
|
+
}
|
|
2449
|
+
/**
|
|
2450
|
+
* 8.18 将全部窗口从屏幕分享的包含列表中移除(该接口仅支持桌面系统)
|
|
2451
|
+
*
|
|
2452
|
+
* @note 该方法只有在 TRTCScreenCaptureSourceInfo 中的 type 指定为 TRTCScreenCaptureSourceTypeWindow 时生效,即分享窗口内容时,额外包含指定窗口的功能才生效。
|
|
2453
|
+
*/
|
|
2454
|
+
removeAllIncludedShareWindow() {
|
|
2455
|
+
this.rtcCloud.removeAllIncludedShareWindow();
|
|
2456
|
+
}
|
|
2427
2457
|
/////////////////////////////////////////////////////////////////////////////////
|
|
2428
2458
|
//
|
|
2429
2459
|
// (九)自定义采集和渲染
|
|
@@ -2909,7 +2939,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2909
2939
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
2910
2940
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
2911
2941
|
*
|
|
2912
|
-
*
|
|
2942
|
+
* 注意:测速过程将产生少量的基础服务费用,详见 [计费概述 > 基础服务](https://cloud.tencent.com/document/product/647/17157#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1) 文档说明。
|
|
2913
2943
|
*
|
|
2914
2944
|
* @param {Number} sdkAppId - 应用标识
|
|
2915
2945
|
* @param {String} userId - 用户标识
|
|
@@ -3168,15 +3198,9 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3168
3198
|
},
|
|
3169
3199
|
setParameter: (param) => {
|
|
3170
3200
|
return this.rtcCloud.setPluginParameter(pluginId, param);
|
|
3171
|
-
},
|
|
3172
|
-
getParameter: () => {
|
|
3173
|
-
return this.rtcCloud.getPluginParameter(pluginId);
|
|
3174
3201
|
}
|
|
3175
3202
|
};
|
|
3176
3203
|
}
|
|
3177
|
-
setPluginCallback(pluginCb) {
|
|
3178
|
-
this.rtcCloud.setPluginCallback(pluginCb);
|
|
3179
|
-
}
|
|
3180
3204
|
getKey(uid, type) {
|
|
3181
3205
|
return String(uid) + '_' + String(type);
|
|
3182
3206
|
}
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -616,6 +616,9 @@ export declare class TRTCRemoteStatistics {
|
|
|
616
616
|
* @param {Number} rtt - 延迟(毫秒),代表 SDK 跟服务器一来一回之间所消耗的时间,这个值越小越好。
|
|
617
617
|
* 一般低于50ms的 rtt 是比较理想的情况,而高于100ms的 rtt 会引入较大的通话延时。
|
|
618
618
|
* 由于数据上下行共享一条网络连接,所以 local 和 remote 的 rtt 相同。
|
|
619
|
+
* @param {Number} gatewayRtt - 延迟(毫秒),指 SDK 到本地路由器网关一次网络往返时间,该值越小越好。
|
|
620
|
+
* 一般低于 50ms 的 gatewayRtt 相对理想,而高于 200ms 的 gatewayRtt 会引入较大的通话延时。
|
|
621
|
+
* 当网络为蜂窝网非 WiFi 类型时,该值无效。
|
|
619
622
|
* @param {Number} receivedBytes - 总接收字节数(包含信令和音视频)
|
|
620
623
|
* @param {Number} sentBytes - 总发送字节总数(包含信令和音视频)
|
|
621
624
|
* @param {TRTCLocalStatistics[]} localStatisticsArray - 自己本地的音视频统计信息,由于可能有大画面、小画面以及辅路画面等多路的情况,所以是一个数组
|
|
@@ -630,13 +633,14 @@ export declare class TRTCStatistics {
|
|
|
630
633
|
appCpu: number;
|
|
631
634
|
systemCpu: number;
|
|
632
635
|
rtt: number;
|
|
636
|
+
gatewayRtt: number;
|
|
633
637
|
receivedBytes: number;
|
|
634
638
|
sentBytes: number;
|
|
635
639
|
localStatisticsArray: TRTCLocalStatistics[];
|
|
636
640
|
localStatisticsArraySize: number;
|
|
637
641
|
remoteStatisticsArray: TRTCRemoteStatistics[];
|
|
638
642
|
remoteStatisticsArraySize: number;
|
|
639
|
-
constructor(upLoss?: number, downLoss?: number, appCpu?: number, systemCpu?: number, rtt?: number, receivedBytes?: number, sentBytes?: number, localStatisticsArray?: TRTCLocalStatistics[], localStatisticsArraySize?: number, remoteStatisticsArray?: TRTCRemoteStatistics[], remoteStatisticsArraySize?: number);
|
|
643
|
+
constructor(upLoss?: number, downLoss?: number, appCpu?: number, systemCpu?: number, rtt?: number, gatewayRtt?: number, receivedBytes?: number, sentBytes?: number, localStatisticsArray?: TRTCLocalStatistics[], localStatisticsArraySize?: number, remoteStatisticsArray?: TRTCRemoteStatistics[], remoteStatisticsArraySize?: number);
|
|
640
644
|
}
|
|
641
645
|
/**
|
|
642
646
|
* 音乐参数
|
|
@@ -693,5 +697,4 @@ export interface PluginInfo {
|
|
|
693
697
|
enable: () => number;
|
|
694
698
|
disable: () => number;
|
|
695
699
|
setParameter: (param: string) => number;
|
|
696
|
-
getParameter: (paramKey: string) => string;
|
|
697
700
|
}
|
package/liteav/trtc_define.js
CHANGED
|
@@ -1194,6 +1194,9 @@ exports.TRTCRemoteStatistics = TRTCRemoteStatistics;
|
|
|
1194
1194
|
* @param {Number} rtt - 延迟(毫秒),代表 SDK 跟服务器一来一回之间所消耗的时间,这个值越小越好。
|
|
1195
1195
|
* 一般低于50ms的 rtt 是比较理想的情况,而高于100ms的 rtt 会引入较大的通话延时。
|
|
1196
1196
|
* 由于数据上下行共享一条网络连接,所以 local 和 remote 的 rtt 相同。
|
|
1197
|
+
* @param {Number} gatewayRtt - 延迟(毫秒),指 SDK 到本地路由器网关一次网络往返时间,该值越小越好。
|
|
1198
|
+
* 一般低于 50ms 的 gatewayRtt 相对理想,而高于 200ms 的 gatewayRtt 会引入较大的通话延时。
|
|
1199
|
+
* 当网络为蜂窝网非 WiFi 类型时,该值无效。
|
|
1197
1200
|
* @param {Number} receivedBytes - 总接收字节数(包含信令和音视频)
|
|
1198
1201
|
* @param {Number} sentBytes - 总发送字节总数(包含信令和音视频)
|
|
1199
1202
|
* @param {TRTCLocalStatistics[]} localStatisticsArray - 自己本地的音视频统计信息,由于可能有大画面、小画面以及辅路画面等多路的情况,所以是一个数组
|
|
@@ -1203,12 +1206,13 @@ exports.TRTCRemoteStatistics = TRTCRemoteStatistics;
|
|
|
1203
1206
|
*
|
|
1204
1207
|
*/
|
|
1205
1208
|
class TRTCStatistics {
|
|
1206
|
-
constructor(upLoss = 0, downLoss = 0, appCpu = 0, systemCpu = 0, rtt = 0, receivedBytes = 0, sentBytes = 0, localStatisticsArray = [], localStatisticsArraySize = 0, remoteStatisticsArray = [], remoteStatisticsArraySize = 0) {
|
|
1209
|
+
constructor(upLoss = 0, downLoss = 0, appCpu = 0, systemCpu = 0, rtt = 0, gatewayRtt = 0, receivedBytes = 0, sentBytes = 0, localStatisticsArray = [], localStatisticsArraySize = 0, remoteStatisticsArray = [], remoteStatisticsArraySize = 0) {
|
|
1207
1210
|
this.upLoss = upLoss;
|
|
1208
1211
|
this.downLoss = downLoss;
|
|
1209
1212
|
this.appCpu = appCpu;
|
|
1210
1213
|
this.systemCpu = systemCpu;
|
|
1211
1214
|
this.rtt = rtt;
|
|
1215
|
+
this.gatewayRtt = gatewayRtt;
|
|
1212
1216
|
this.receivedBytes = receivedBytes;
|
|
1213
1217
|
this.sentBytes = sentBytes;
|
|
1214
1218
|
this.localStatisticsArray = localStatisticsArray;
|