trtc-electron-sdk 9.6.8-alpha.7 → 9.7.113-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 CHANGED
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
- import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams } from './trtc_define';
3
+ import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo } from './trtc_define';
4
4
  export * from './trtc_define';
5
5
  export * from './trtc_code';
6
6
  /**
@@ -323,9 +323,7 @@ declare class TRTCCloud extends EventEmitter {
323
323
  */
324
324
  handleOnConnectionRecovery(): void;
325
325
  /**
326
- * 5.4 废弃事件:服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
327
- *
328
- * @deprecated 从 TRTCSDK 9.3 后该接口已被废弃,不会抛出该事件, 请采用 onSpeedTestResult 事件代替
326
+ * 5.4 服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
329
327
  *
330
328
  * @event TRTCCallback#onSpeedTest
331
329
  * @param {TRTCSpeedTestResult} currentResult - 当前完成的测速结果
@@ -333,15 +331,6 @@ declare class TRTCCloud extends EventEmitter {
333
331
  * @param {Number} totalCount - 需要测速的服务器总数量
334
332
  */
335
333
  bindOnSpeedTest(): void;
336
- /**
337
- * 5.5 网速测试的结果回调
338
- *
339
- * 该统计回调由 startSpeedTest 触发。
340
- *
341
- * @event TRTCCallback#onSpeedTestResult
342
- * @param {TRTCSpeedTestResult} result 网速测试数据数据,包括丢包、往返延迟、上下行的带宽速率。
343
- */
344
- bindOnSpeedTestResult(): void;
345
334
  /**
346
335
  * 6.1 摄像头准备就绪
347
336
  *
@@ -855,7 +844,8 @@ declare class TRTCCloud extends EventEmitter {
855
844
  * 当屏蔽本地视频后,房间里的其它成员将会收到 onUserVideoAvailable 回调通知
856
845
  * @param {Boolean} mute - true:屏蔽;false:开启,默认值:false
857
846
  */
858
- muteLocalVideo(mute: boolean, streamType?: TRTCVideoStreamType): void;
847
+ muteLocalVideo(mute: boolean): void;
848
+ setVideoMuteImage(image: ArrayBuffer, width: number, height: number, fps: number): void;
859
849
  /**
860
850
  * 3.4 开始显示远端视频画面
861
851
  *
@@ -891,9 +881,8 @@ declare class TRTCCloud extends EventEmitter {
891
881
  *
892
882
  * @param {String} userId - 对方的用户标识
893
883
  * @param {Boolean} mute - 是否停止接收
894
- * @param {TRTCVideoStreamType} streamType - 视频流类型
895
884
  */
896
- muteRemoteVideoStream(userId: string, mute: boolean, streamType?: TRTCVideoStreamType): void;
885
+ muteRemoteVideoStream(userId: string, mute: boolean): void;
897
886
  /**
898
887
  * 3.8 停止接收所有远端视频流
899
888
  *
@@ -1172,15 +1161,10 @@ declare class TRTCCloud extends EventEmitter {
1172
1161
  * 注意:录音文件路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式。
1173
1162
  * 例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
1174
1163
  *
1175
- * @param {TRTCAudioRecordingParams} params - 录音参数。
1176
- * @param {String} params.filePath - 文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写
1177
- * @param {TRTCAudioRecordingContent} params.recordingContent - 音频录制内容类型
1164
+ * @param {String} path - 录音文件路径(必填),录音文件的保存路径,该路径需要用户自行指定,请确保路径存在且可写。
1178
1165
  * @return {Number} 0:成功;-1:录音已开始;-2:文件或目录创建失败;-3:后缀指定的音频格式不支持
1179
- *
1180
- * 注意:
1181
- * - 在 9.3 之前的版本,params 为 string 代表 录音文件路径(必填), 9.3 以及以后同时支持 string 类型和 TRTCAudioRecordingParams。
1182
1166
  */
1183
- startAudioRecording(params: TRTCAudioRecordingParams | string): number;
1167
+ startAudioRecording(path: string): number;
1184
1168
  /**
1185
1169
  * 4.13 停止录音
1186
1170
  *
@@ -1445,11 +1429,6 @@ declare class TRTCCloud extends EventEmitter {
1445
1429
  * - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
1446
1430
  * - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
1447
1431
  *
1448
- * @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
1449
- * @param {Rect} captureRect - 指定捕获的区域
1450
- * @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
1451
- *
1452
- * 废弃参数使用方法(针对 9.3 以下版本):
1453
1432
  * @param {TRTCScreenCaptureSourceType} type - 采集源类型
1454
1433
  * - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
1455
1434
  * - TRTCScreenCaptureSourceTypeScreen: 该分享目标是整个Windows桌面
@@ -1464,7 +1443,7 @@ declare class TRTCCloud extends EventEmitter {
1464
1443
  * @param {Boolean} captureMouse - 指定是否捕获鼠标指针
1465
1444
  * @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
1466
1445
  */
1467
- selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean): any;
1446
+ selectScreenCaptureTarget(type: number, sourceId: string, sourcename: string, captureRect: Rect, captureMouse: boolean, highlightWindow: boolean): any;
1468
1447
  /**
1469
1448
  * 8.7 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。(暂不支持 mac 平台预览界面)
1470
1449
  *
@@ -1883,21 +1862,13 @@ declare class TRTCCloud extends EventEmitter {
1883
1862
  * 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
1884
1863
  * 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
1885
1864
  *
1886
- * 注意:
1887
- * 1. 测速过程将产生少量的基础服务费用,详见 [计费概述 > 基础服务](https://cloud.tencent.com/document/product/647/17157#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1) 文档说明。
1888
- * 2. 请在进入房间前进行网速测试,在房间中网速测试会影响正常的音视频传输效果,而且由于干扰过多,网速测试结果也不准确。
1889
- * 3. 同一时间只允许一项网速测试任务运行。
1890
- *
1891
- * @param {TRTCSpeedTestParams} params - 测速参数
1892
- * @param {Number} params.sdkAppId - 应用标识
1893
- * @param {String} params.userId - 用户标识
1894
- * @param {String} params.userSig - 用户签名
1895
- * @param {Number} params.expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
1896
- * @param {Number} params.expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
1865
+ * 注意:测速本身会消耗一定的流量,所以也会产生少量额外的流量费用。
1897
1866
  *
1898
- * @return 接口调用结果,< 0:失败
1867
+ * @param {Number} sdkAppId - 应用标识
1868
+ * @param {String} userId - 用户标识
1869
+ * @param {String} userSig - 用户签名
1899
1870
  */
1900
- startSpeedTest(params: TRTCSpeedTestParams | number, userId?: string, userSig?: string): any;
1871
+ startSpeedTest(sdkAppId: number, userId: string, userSig: string): void;
1901
1872
  /**
1902
1873
  * 13.2 停止网络测速
1903
1874
  */
package/liteav/trtc.js CHANGED
@@ -342,7 +342,6 @@ class TRTCCloud extends events_1.EventEmitter {
342
342
  this.bindOnNetworkQuality();
343
343
  this.bindOnStatistics();
344
344
  this.bindOnSpeedTest();
345
- this.bindOnSpeedTestResult();
346
345
  this.bindOnUserVoiceVolume();
347
346
  this.bindOnRecvCustomCmdMsg();
348
347
  this.bindOnMissCustomCmdMsg();
@@ -708,9 +707,7 @@ class TRTCCloud extends events_1.EventEmitter {
708
707
  this.fire('onConnectionRecovery');
709
708
  }
710
709
  /**
711
- * 5.4 废弃事件:服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
712
- *
713
- * @deprecated 从 TRTCSDK 9.3 后该接口已被废弃,不会抛出该事件, 请采用 onSpeedTestResult 事件代替
710
+ * 5.4 服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
714
711
  *
715
712
  * @event TRTCCallback#onSpeedTest
716
713
  * @param {TRTCSpeedTestResult} currentResult - 当前完成的测速结果
@@ -722,19 +719,6 @@ class TRTCCloud extends events_1.EventEmitter {
722
719
  this.fire('onSpeedTest', currentResult, finishedCount, totalCount);
723
720
  });
724
721
  }
725
- /**
726
- * 5.5 网速测试的结果回调
727
- *
728
- * 该统计回调由 startSpeedTest 触发。
729
- *
730
- * @event TRTCCallback#onSpeedTestResult
731
- * @param {TRTCSpeedTestResult} result 网速测试数据数据,包括丢包、往返延迟、上下行的带宽速率。
732
- */
733
- bindOnSpeedTestResult() {
734
- this.rtcCloud.onEvent('onSpeedTestResult', (result) => {
735
- this.fire('onSpeedTestResult', result);
736
- });
737
- }
738
722
  /////////////////////////////////////////////////////////////////////////////////
739
723
  //
740
724
  // (六)硬件设备事件回调
@@ -1467,12 +1451,11 @@ class TRTCCloud extends events_1.EventEmitter {
1467
1451
  * 当屏蔽本地视频后,房间里的其它成员将会收到 onUserVideoAvailable 回调通知
1468
1452
  * @param {Boolean} mute - true:屏蔽;false:开启,默认值:false
1469
1453
  */
1470
- muteLocalVideo(mute, streamType) {
1471
- let newStreamType = streamType;
1472
- if (newStreamType === undefined) {
1473
- newStreamType = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig;
1474
- }
1475
- this.rtcCloud.muteLocalVideo(newStreamType, mute);
1454
+ muteLocalVideo(mute) {
1455
+ this.rtcCloud.muteLocalVideo(mute);
1456
+ }
1457
+ setVideoMuteImage(image, width, height, fps) {
1458
+ this.rtcCloud.setVideoMuteImage(image, width, height, fps);
1476
1459
  }
1477
1460
  /**
1478
1461
  * 3.4 开始显示远端视频画面
@@ -1544,14 +1527,9 @@ class TRTCCloud extends events_1.EventEmitter {
1544
1527
  *
1545
1528
  * @param {String} userId - 对方的用户标识
1546
1529
  * @param {Boolean} mute - 是否停止接收
1547
- * @param {TRTCVideoStreamType} streamType - 视频流类型
1548
1530
  */
1549
- muteRemoteVideoStream(userId, mute, streamType) {
1550
- let newStreamType = streamType;
1551
- if (newStreamType === undefined) {
1552
- newStreamType = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig;
1553
- }
1554
- this.rtcCloud.muteRemoteVideoStream(userId, newStreamType, mute);
1531
+ muteRemoteVideoStream(userId, mute) {
1532
+ this.rtcCloud.muteRemoteVideoStream(userId, mute);
1555
1533
  }
1556
1534
  /**
1557
1535
  * 3.8 停止接收所有远端视频流
@@ -1956,25 +1934,11 @@ class TRTCCloud extends events_1.EventEmitter {
1956
1934
  * 注意:录音文件路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式。
1957
1935
  * 例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
1958
1936
  *
1959
- * @param {TRTCAudioRecordingParams} params - 录音参数。
1960
- * @param {String} params.filePath - 文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写
1961
- * @param {TRTCAudioRecordingContent} params.recordingContent - 音频录制内容类型
1937
+ * @param {String} path - 录音文件路径(必填),录音文件的保存路径,该路径需要用户自行指定,请确保路径存在且可写。
1962
1938
  * @return {Number} 0:成功;-1:录音已开始;-2:文件或目录创建失败;-3:后缀指定的音频格式不支持
1963
- *
1964
- * 注意:
1965
- * - 在 9.3 之前的版本,params 为 string 代表 录音文件路径(必填), 9.3 以及以后同时支持 string 类型和 TRTCAudioRecordingParams。
1966
1939
  */
1967
- startAudioRecording(params) {
1968
- if (params instanceof trtc_define_1.TRTCAudioRecordingParams) {
1969
- return this.rtcCloud.startAudioRecording(params.filePath, params.recordingContent);
1970
- }
1971
- if (typeof params === 'string') {
1972
- const path = params;
1973
- const recordParams = new trtc_define_1.TRTCAudioRecordingParams(path);
1974
- return this.rtcCloud.startAudioRecording(recordParams.filePath, recordParams.recordingContent);
1975
- }
1976
- console.error('startAudioRecording, params is not instanceof TRTCAudioRecordingParams!');
1977
- return -1;
1940
+ startAudioRecording(path) {
1941
+ return this.rtcCloud.startAudioRecording(path);
1978
1942
  }
1979
1943
  /**
1980
1944
  * 4.13 停止录音
@@ -2328,11 +2292,6 @@ class TRTCCloud extends events_1.EventEmitter {
2328
2292
  * - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
2329
2293
  * - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
2330
2294
  *
2331
- * @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
2332
- * @param {Rect} captureRect - 指定捕获的区域
2333
- * @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
2334
- *
2335
- * 废弃参数使用方法(针对 9.3 以下版本):
2336
2295
  * @param {TRTCScreenCaptureSourceType} type - 采集源类型
2337
2296
  * - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
2338
2297
  * - TRTCScreenCaptureSourceTypeScreen: 该分享目标是整个Windows桌面
@@ -2347,20 +2306,9 @@ class TRTCCloud extends events_1.EventEmitter {
2347
2306
  * @param {Boolean} captureMouse - 指定是否捕获鼠标指针
2348
2307
  * @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
2349
2308
  */
2350
- selectScreenCaptureTarget(source, captureRect, property, deprecatedCaptureRect, captureMouse, highlightWindow) {
2351
- if (source.sourceId && captureRect instanceof trtc_define_1.Rect && property instanceof trtc_define_1.TRTCScreenCaptureProperty) {
2352
- const realSource = source;
2353
- return this.rtcCloud.selectScreenCaptureTarget(realSource.type, realSource.sourceId, realSource.sourceName, realSource.isMinimizeWindow, captureRect.left, captureRect.top, captureRect.right, captureRect.bottom, property.enableCaptureMouse, property.enableHighLight, property.enableHighPerformance, property.highLightColor, property.highLightWidth, property.enableCaptureChildWindow);
2354
- }
2355
- const type = source;
2356
- const sourceId = captureRect;
2357
- const sourcename = property;
2358
- if (sourceId !== null && sourceId !== undefined && sourcename !== null
2359
- && sourcename !== undefined && deprecatedCaptureRect !== undefined && captureMouse !== undefined
2360
- && highlightWindow !== undefined) {
2361
- const selSource = new trtc_define_1.TRTCScreenCaptureSourceInfo(type, sourceId, sourcename);
2362
- const selProperty = new trtc_define_1.TRTCScreenCaptureProperty(captureMouse, highlightWindow);
2363
- return this.rtcCloud.selectScreenCaptureTarget(selSource.type, selSource.sourceId, selSource.sourceName, selSource.isMinimizeWindow, deprecatedCaptureRect.left, deprecatedCaptureRect.top, deprecatedCaptureRect.right, deprecatedCaptureRect.bottom, selProperty.enableCaptureMouse, selProperty.enableHighLight, selProperty.enableHighPerformance, selProperty.highLightColor, selProperty.highLightWidth, selProperty.enableCaptureChildWindow);
2309
+ selectScreenCaptureTarget(type, sourceId, sourcename, captureRect, captureMouse, highlightWindow) {
2310
+ if (sourceId !== null && sourceId !== undefined && sourcename !== null && sourcename !== undefined) {
2311
+ return this.rtcCloud.selectScreenCaptureTarget(type, sourceId, sourcename, captureRect.left, captureRect.top, captureRect.right, captureRect.bottom, captureMouse, highlightWindow);
2364
2312
  }
2365
2313
  else {
2366
2314
  console.error('selectScreenCaptureTarget, sourceId or sourcename is undefined!');
@@ -2996,31 +2944,14 @@ class TRTCCloud extends events_1.EventEmitter {
2996
2944
  * 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
2997
2945
  * 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
2998
2946
  *
2999
- * 注意:
3000
- * 1. 测速过程将产生少量的基础服务费用,详见 [计费概述 > 基础服务](https://cloud.tencent.com/document/product/647/17157#.E5.9F.BA.E7.A1.80.E6.9C.8D.E5.8A.A1) 文档说明。
3001
- * 2. 请在进入房间前进行网速测试,在房间中网速测试会影响正常的音视频传输效果,而且由于干扰过多,网速测试结果也不准确。
3002
- * 3. 同一时间只允许一项网速测试任务运行。
3003
- *
3004
- * @param {TRTCSpeedTestParams} params - 测速参数
3005
- * @param {Number} params.sdkAppId - 应用标识
3006
- * @param {String} params.userId - 用户标识
3007
- * @param {String} params.userSig - 用户签名
3008
- * @param {Number} params.expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
3009
- * @param {Number} params.expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
3010
- *
3011
- * @return 接口调用结果,< 0:失败
3012
- */
3013
- startSpeedTest(params, userId, userSig) {
3014
- if (params instanceof trtc_define_1.TRTCSpeedTestParams) {
3015
- return this.rtcCloud.startSpeedTest(params.sdkAppId, params.userId, params.userSig, params.expectedUpBandwidth, params.expectedDownBandwidth);
3016
- }
3017
- if (userId !== undefined && userSig !== undefined) {
3018
- const sdkAppId = params;
3019
- const speedTestParams = new trtc_define_1.TRTCSpeedTestParams(sdkAppId, userId, userSig);
3020
- return this.rtcCloud.startSpeedTest(speedTestParams.sdkAppId, speedTestParams.userId, speedTestParams.userSig, speedTestParams.expectedUpBandwidth, speedTestParams.expectedDownBandwidth);
3021
- }
3022
- console.error('startSpeedTest, param is error');
3023
- return -1;
2947
+ * 注意:测速本身会消耗一定的流量,所以也会产生少量额外的流量费用。
2948
+ *
2949
+ * @param {Number} sdkAppId - 应用标识
2950
+ * @param {String} userId - 用户标识
2951
+ * @param {String} userSig - 用户签名
2952
+ */
2953
+ startSpeedTest(sdkAppId, userId, userSig) {
2954
+ this.rtcCloud.startSpeedTest(sdkAppId, userId, userSig);
3024
2955
  }
3025
2956
  /**
3026
2957
  * 13.2 停止网络测速
@@ -142,29 +142,7 @@ export declare class TRTCScreenCaptureSourceInfo {
142
142
  constructor(type?: TRTCScreenCaptureSourceType, sourceId?: string, sourceName?: string, thumbBGRA?: TRTCImageBuffer, iconBGRA?: TRTCImageBuffer, isMinimizeWindow?: boolean);
143
143
  }
144
144
  /**
145
- * 3.6 屏幕分享的进阶控制参数
146
- *
147
- * 该参数用于屏幕分享相关的接口 [selectScreenCaptureTarget]{@link TRTCCloud#selectScreenCaptureTarget},用于在指定分享目标时设定一系列进阶控制参数。
148
- * 比如:是否采集鼠标、是否要采集子窗口、是否要在被分享目标周围绘制一个边框等。
149
- *
150
- * @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
151
- * @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
152
- * @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
153
- * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26。
154
- * @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5px,您可以设置的最大值为 50。
155
- * @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
156
- */
157
- export declare class TRTCScreenCaptureProperty {
158
- enableCaptureMouse: boolean;
159
- enableHighLight: boolean;
160
- enableHighPerformance: boolean;
161
- highLightColor: number;
162
- highLightWidth: number;
163
- enableCaptureChildWindow: boolean;
164
- constructor(enableCaptureMouse?: boolean, enableHighLight?: boolean, enableHighPerformance?: boolean, highLightColor?: number, highLightWidth?: number, enableCaptureChildWindow?: boolean);
165
- }
166
- /**
167
- * 3.7 设备信息
145
+ * 3.6 设备信息
168
146
  *
169
147
  * @param {String} deviceId - 设备PID,字符编码格式是UTF-8
170
148
  * @param {String} deviceName - 设备名称,字符编码格式是UTF-8
@@ -176,7 +154,7 @@ export declare class TRTCDeviceInfo {
176
154
  constructor(deviceId?: string, deviceName?: string);
177
155
  }
178
156
  /**
179
- * 3.8 视频帧数据
157
+ * 3.7 视频帧数据
180
158
  *
181
159
  * @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
182
160
  * @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
@@ -379,25 +357,6 @@ export declare class TRTCVolumeInfo {
379
357
  volume: number;
380
358
  constructor(userId?: string, volume?: number);
381
359
  }
382
- /**
383
- * 5.7 测速参数
384
- *
385
- * 您可以在用户进入房间前通过 [startSpeedTest]{@link TRTCCloud#startSpeedTest} 接口测试网速(注意:请不要在通话中调用)。
386
- *
387
- * @param {Number} sdkAppId - 应用标识
388
- * @param {String} userId - 用户标识
389
- * @param {String} userSig - 用户签名
390
- * @param {Number} expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
391
- * @param {Number} expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
392
- */
393
- export declare class TRTCSpeedTestParams {
394
- sdkAppId: number;
395
- userId: string;
396
- userSig: string;
397
- expectedUpBandwidth: number;
398
- expectedDownBandwidth: number;
399
- constructor(sdkAppId?: number, userId?: string, userSig?: string, expectedUpBandwidth?: number, expectedDownBandwidth?: number);
400
- }
401
360
  /**
402
361
  * 5.8 网络测速结果
403
362
  *
@@ -479,19 +438,8 @@ export declare enum TRTCTranscodingConfigMode {
479
438
  TRTC_TranscodingConfigMode_Template_PresetLayout = 8,
480
439
  TRTC_TranscodingConfigMode_Template_ScreenSharing = 9
481
440
  }
482
- export declare enum TRTCMixInputType {
483
- TRTCMixInputTypeUndefined = 0,
484
- TRTCMixInputTypeAudioVideo = 1,
485
- TRTCMixInputTypePureVideo = 2,
486
- TRTCMixInputTypePureAudio = 3
487
- }
488
- export declare enum TRTCAudioRecordingContent {
489
- TRTCAudioRecordingContentAll = 0,
490
- TRTCAudioRecordingContentLocal = 1,
491
- TRTCAudioRecordingContentRemote = 2
492
- }
493
441
  /**
494
- * 5.13 云端混流(转码)配置
442
+ * 5.11 云端混流(转码)配置
495
443
  *
496
444
  * 包括最终编码质量和各路画面的摆放位置
497
445
  *
@@ -548,7 +496,7 @@ export declare class TRTCTranscodingConfig {
548
496
  constructor(mode?: TRTCTranscodingConfigMode, appId?: number, bizId?: number, videoWidth?: number, videoHeight?: number, videoBitrate?: number, videoFramerate?: number, videoGOP?: number, backgroundColor?: number, backgroundImage?: string, audioSampleRate?: number, audioBitrate?: number, audioChannels?: number, mixUsersArray?: any[], streamId?: string);
549
497
  }
550
498
  /**
551
- * 5.14 CDN 旁路推流参数
499
+ * 5.12 CDN 旁路推流参数
552
500
  *
553
501
  * @param {Number} appId - 腾讯云 AppID,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
554
502
  * @param {Number} bizId - 腾讯云直播 bizId,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
@@ -562,19 +510,17 @@ export declare class TRTCPublishCDNParam {
562
510
  constructor(appId?: number, bizId?: number, url?: null | string);
563
511
  }
564
512
  /**
565
- * 5.15 录音参数
513
+ * 5.13 录音参数
566
514
  *
567
515
  * 请正确填写参数,确保录音文件顺利生成。
568
516
  *
569
- * @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
570
- * 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
571
- * @param {TRTCAudioRecordingContent} recordingContent - 【字段含义】音频录制内容类型。
572
- * 【特别说明】默认录制所有本地和远端音频。
517
+ * @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
518
+ * 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
519
+ *
573
520
  */
574
521
  export declare class TRTCAudioRecordingParams {
575
522
  filePath: null | string;
576
- recordingContent: TRTCAudioRecordingContent;
577
- constructor(filePath?: null | string, recordingContent?: TRTCAudioRecordingContent);
523
+ constructor(filePath?: null | string);
578
524
  }
579
525
  /**
580
526
  * 5.14 音效
@@ -6,7 +6,7 @@
6
6
  *
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCAudioRecordingContent = exports.TRTCMixInputType = exports.TRTCTranscodingConfigMode = exports.TRTCMixUser = exports.Rect = exports.TRTCSpeedTestResult = exports.TRTCSpeedTestParams = exports.TRTCVolumeInfo = exports.TRTCQualityInfo = exports.TRTCNetworkQosParam = exports.TRTCRenderParams = exports.TRTCVideoEncParam = exports.TRTCParams = exports.TRTCWaterMarkSrcType = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCVideoFrame = exports.TRTCDeviceInfo = exports.TRTCScreenCaptureProperty = exports.TRTCScreenCaptureSourceInfo = exports.TRTCImageBuffer = exports.TRTCAudioQuality = exports.TRTCScreenCaptureSourceType = exports.TRTCAudioFrameFormat = exports.TRTCVideoQosPreference = exports.TRTCQosControlMode = exports.TRTCRoleType = exports.TRTCAppScene = exports.TRTCVideoMirrorType = exports.TRTCVideoBufferType = exports.TRTCVideoPixelFormat = exports.TRTCBeautyStyle = exports.TRTCVideoRotation = exports.TRTCVideoFillMode = exports.TRTCQuality = exports.TRTCVideoStreamType = exports.TRTCVideoResolutionMode = exports.TRTCVideoResolution = void 0;
9
+ exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCTranscodingConfigMode = exports.TRTCMixUser = exports.Rect = exports.TRTCSpeedTestResult = exports.TRTCVolumeInfo = exports.TRTCQualityInfo = exports.TRTCNetworkQosParam = exports.TRTCRenderParams = exports.TRTCVideoEncParam = exports.TRTCParams = exports.TRTCWaterMarkSrcType = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCVideoFrame = exports.TRTCDeviceInfo = exports.TRTCScreenCaptureSourceInfo = exports.TRTCImageBuffer = exports.TRTCAudioQuality = exports.TRTCScreenCaptureSourceType = exports.TRTCAudioFrameFormat = exports.TRTCVideoQosPreference = exports.TRTCQosControlMode = exports.TRTCRoleType = exports.TRTCAppScene = exports.TRTCVideoMirrorType = exports.TRTCVideoBufferType = exports.TRTCVideoPixelFormat = exports.TRTCBeautyStyle = exports.TRTCVideoRotation = exports.TRTCVideoFillMode = exports.TRTCQuality = exports.TRTCVideoStreamType = exports.TRTCVideoResolutionMode = exports.TRTCVideoResolution = void 0;
10
10
  /////////////////////////////////////////////////////////////////////////////////
11
11
  //
12
12
  // 【(一)视频相关枚举值定义】
@@ -539,31 +539,7 @@ class TRTCScreenCaptureSourceInfo {
539
539
  exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
540
540
  ;
541
541
  /**
542
- * 3.6 屏幕分享的进阶控制参数
543
- *
544
- * 该参数用于屏幕分享相关的接口 [selectScreenCaptureTarget]{@link TRTCCloud#selectScreenCaptureTarget},用于在指定分享目标时设定一系列进阶控制参数。
545
- * 比如:是否采集鼠标、是否要采集子窗口、是否要在被分享目标周围绘制一个边框等。
546
- *
547
- * @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
548
- * @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
549
- * @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
550
- * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26。
551
- * @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5px,您可以设置的最大值为 50。
552
- * @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
553
- */
554
- class TRTCScreenCaptureProperty {
555
- constructor(enableCaptureMouse = true, enableHighLight = true, enableHighPerformance = true, highLightColor = 0, highLightWidth = 0, enableCaptureChildWindow = false) {
556
- this.enableCaptureMouse = enableCaptureMouse;
557
- this.enableHighLight = enableHighLight;
558
- this.enableHighPerformance = enableHighPerformance;
559
- this.highLightColor = highLightColor;
560
- this.highLightWidth = highLightWidth;
561
- this.enableCaptureChildWindow = enableCaptureChildWindow;
562
- }
563
- }
564
- exports.TRTCScreenCaptureProperty = TRTCScreenCaptureProperty;
565
- /**
566
- * 3.7 设备信息
542
+ * 3.6 设备信息
567
543
  *
568
544
  * @param {String} deviceId - 设备PID,字符编码格式是UTF-8
569
545
  * @param {String} deviceName - 设备名称,字符编码格式是UTF-8
@@ -578,7 +554,7 @@ class TRTCDeviceInfo {
578
554
  exports.TRTCDeviceInfo = TRTCDeviceInfo;
579
555
  ;
580
556
  /**
581
- * 3.8 视频帧数据
557
+ * 3.7 视频帧数据
582
558
  *
583
559
  * @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
584
560
  * @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
@@ -885,27 +861,6 @@ class TRTCVolumeInfo {
885
861
  }
886
862
  exports.TRTCVolumeInfo = TRTCVolumeInfo;
887
863
  ;
888
- /**
889
- * 5.7 测速参数
890
- *
891
- * 您可以在用户进入房间前通过 [startSpeedTest]{@link TRTCCloud#startSpeedTest} 接口测试网速(注意:请不要在通话中调用)。
892
- *
893
- * @param {Number} sdkAppId - 应用标识
894
- * @param {String} userId - 用户标识
895
- * @param {String} userSig - 用户签名
896
- * @param {Number} expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
897
- * @param {Number} expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
898
- */
899
- class TRTCSpeedTestParams {
900
- constructor(sdkAppId = 0, userId = '', userSig = '', expectedUpBandwidth = 0, expectedDownBandwidth = 0) {
901
- this.sdkAppId = sdkAppId;
902
- this.userId = userId;
903
- this.userSig = userSig;
904
- this.expectedUpBandwidth = expectedUpBandwidth;
905
- this.expectedDownBandwidth = expectedDownBandwidth;
906
- }
907
- }
908
- exports.TRTCSpeedTestParams = TRTCSpeedTestParams;
909
864
  /**
910
865
  * 5.8 网络测速结果
911
866
  *
@@ -1044,52 +999,7 @@ var TRTCTranscodingConfigMode;
1044
999
  })(TRTCTranscodingConfigMode = exports.TRTCTranscodingConfigMode || (exports.TRTCTranscodingConfigMode = {}));
1045
1000
  ;
1046
1001
  /**
1047
- * 5.11 混流输入类型
1048
- *
1049
- * @enum {Number}
1050
- *
1051
- */
1052
- const TRTCMixInputType_HACK_JSDOC = {
1053
- /** 不指定,SDK 会根据另一个参数 pureAudio 的数值决定混流输入类型 */
1054
- TRTCMixInputTypeUndefined: 0,
1055
- /** 混入音频和视频 */
1056
- TRTCMixInputTypeAudioVideo: 1,
1057
- /** 只混入视频 */
1058
- TRTCMixInputTypePureVideo: 2,
1059
- /** 只混入音频 */
1060
- TRTCMixInputTypePureAudio: 3
1061
- };
1062
- var TRTCMixInputType;
1063
- (function (TRTCMixInputType) {
1064
- TRTCMixInputType[TRTCMixInputType["TRTCMixInputTypeUndefined"] = 0] = "TRTCMixInputTypeUndefined";
1065
- TRTCMixInputType[TRTCMixInputType["TRTCMixInputTypeAudioVideo"] = 1] = "TRTCMixInputTypeAudioVideo";
1066
- TRTCMixInputType[TRTCMixInputType["TRTCMixInputTypePureVideo"] = 2] = "TRTCMixInputTypePureVideo";
1067
- TRTCMixInputType[TRTCMixInputType["TRTCMixInputTypePureAudio"] = 3] = "TRTCMixInputTypePureAudio";
1068
- })(TRTCMixInputType = exports.TRTCMixInputType || (exports.TRTCMixInputType = {}));
1069
- /**
1070
- * 5.12 音频录制内容类型, 9.3 版本开始支持
1071
- *
1072
- * 该枚举类型用于音频录制接口 [startAudioRecording]{@link TRTCCloud#startAudioRecording},用于指定录制音频的内容。
1073
- *
1074
- * @enum {Number}
1075
- *
1076
- */
1077
- const TRTCAudioRecordingContent_HACK_JSDOC = {
1078
- /** 录制本地和远端所有音频 */
1079
- TRTCAudioRecordingContentAll: 0,
1080
- /** 仅录制本地音频 */
1081
- TRTCAudioRecordingContentLocal: 1,
1082
- /** 仅录制远端音频 */
1083
- TRTCAudioRecordingContentRemote: 2,
1084
- };
1085
- var TRTCAudioRecordingContent;
1086
- (function (TRTCAudioRecordingContent) {
1087
- TRTCAudioRecordingContent[TRTCAudioRecordingContent["TRTCAudioRecordingContentAll"] = 0] = "TRTCAudioRecordingContentAll";
1088
- TRTCAudioRecordingContent[TRTCAudioRecordingContent["TRTCAudioRecordingContentLocal"] = 1] = "TRTCAudioRecordingContentLocal";
1089
- TRTCAudioRecordingContent[TRTCAudioRecordingContent["TRTCAudioRecordingContentRemote"] = 2] = "TRTCAudioRecordingContentRemote";
1090
- })(TRTCAudioRecordingContent = exports.TRTCAudioRecordingContent || (exports.TRTCAudioRecordingContent = {}));
1091
- /**
1092
- * 5.13 云端混流(转码)配置
1002
+ * 5.11 云端混流(转码)配置
1093
1003
  *
1094
1004
  * 包括最终编码质量和各路画面的摆放位置
1095
1005
  *
@@ -1149,7 +1059,7 @@ class TRTCTranscodingConfig {
1149
1059
  exports.TRTCTranscodingConfig = TRTCTranscodingConfig;
1150
1060
  ;
1151
1061
  /**
1152
- * 5.14 CDN 旁路推流参数
1062
+ * 5.12 CDN 旁路推流参数
1153
1063
  *
1154
1064
  * @param {Number} appId - 腾讯云 AppID,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
1155
1065
  * @param {Number} bizId - 腾讯云直播 bizId,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
@@ -1166,19 +1076,17 @@ class TRTCPublishCDNParam {
1166
1076
  exports.TRTCPublishCDNParam = TRTCPublishCDNParam;
1167
1077
  ;
1168
1078
  /**
1169
- * 5.15 录音参数
1079
+ * 5.13 录音参数
1170
1080
  *
1171
1081
  * 请正确填写参数,确保录音文件顺利生成。
1172
1082
  *
1173
- * @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
1174
- * 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
1175
- * @param {TRTCAudioRecordingContent} recordingContent - 【字段含义】音频录制内容类型。
1176
- * 【特别说明】默认录制所有本地和远端音频。
1083
+ * @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
1084
+ * 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
1085
+ *
1177
1086
  */
1178
1087
  class TRTCAudioRecordingParams {
1179
- constructor(filePath = null, recordingContent = TRTCAudioRecordingContent.TRTCAudioRecordingContentAll) {
1088
+ constructor(filePath = null) {
1180
1089
  this.filePath = filePath;
1181
- this.recordingContent = recordingContent;
1182
1090
  }
1183
1091
  }
1184
1092
  exports.TRTCAudioRecordingParams = TRTCAudioRecordingParams;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "9.6.8-alpha.7",
3
+ "version": "9.7.113-beta.2",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",
@@ -42,7 +42,7 @@
42
42
  "copy:types": "node ./scripts/copy-types.js",
43
43
  "publish_doc": "node ./scripts/publish-doc.js",
44
44
  "doc": "npm run doc:clean && npm run doc:build",
45
- "doc:build": "./node_modules/.bin/jsdoc -c ./jsdoc/jsdoc.json && node ./jsdoc/fix-doc.js",
45
+ "doc:build": "jsdoc -c ./jsdoc/jsdoc.json && node ./jsdoc/fix-doc.js",
46
46
  "doc:clean": "node ./jsdoc/clean-doc.js",
47
47
  "prerelease": "npm run build && npm run doc && node ./scripts/prerelase.js",
48
48
  "publish_npm": "node scripts/publish-npm.js"