trtc-electron-sdk 9.6.8-alpha.2 → 9.6.8-alpha.5
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 +42 -12
- package/liteav/trtc.js +91 -19
- package/liteav/trtc_define.d.ts +63 -9
- package/liteav/trtc_define.js +102 -10
- package/package.json +1 -1
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 } 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, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams } from './trtc_define';
|
|
4
4
|
export * from './trtc_define';
|
|
5
5
|
export * from './trtc_code';
|
|
6
6
|
/**
|
|
@@ -323,7 +323,9 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
323
323
|
*/
|
|
324
324
|
handleOnConnectionRecovery(): void;
|
|
325
325
|
/**
|
|
326
|
-
* 5.4
|
|
326
|
+
* 5.4 废弃事件:服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
|
|
327
|
+
*
|
|
328
|
+
* @deprecated 从 TRTCSDK 9.3 后该接口已被废弃,不会抛出该事件, 请采用 onSpeedTestResult 事件代替
|
|
327
329
|
*
|
|
328
330
|
* @event TRTCCallback#onSpeedTest
|
|
329
331
|
* @param {TRTCSpeedTestResult} currentResult - 当前完成的测速结果
|
|
@@ -331,6 +333,15 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
331
333
|
* @param {Number} totalCount - 需要测速的服务器总数量
|
|
332
334
|
*/
|
|
333
335
|
bindOnSpeedTest(): void;
|
|
336
|
+
/**
|
|
337
|
+
* 5.5 网速测试的结果回调
|
|
338
|
+
*
|
|
339
|
+
* 该统计回调由 startSpeedTest 触发。
|
|
340
|
+
*
|
|
341
|
+
* @event TRTCCallback#onSpeedTestResult
|
|
342
|
+
* @param {TRTCSpeedTestResult} result 网速测试数据数据,包括丢包、往返延迟、上下行的带宽速率。
|
|
343
|
+
*/
|
|
344
|
+
bindOnSpeedTestResult(): void;
|
|
334
345
|
/**
|
|
335
346
|
* 6.1 摄像头准备就绪
|
|
336
347
|
*
|
|
@@ -844,7 +855,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
844
855
|
* 当屏蔽本地视频后,房间里的其它成员将会收到 onUserVideoAvailable 回调通知
|
|
845
856
|
* @param {Boolean} mute - true:屏蔽;false:开启,默认值:false
|
|
846
857
|
*/
|
|
847
|
-
muteLocalVideo(mute: boolean): void;
|
|
858
|
+
muteLocalVideo(mute: boolean, streamType?: TRTCVideoStreamType): void;
|
|
848
859
|
/**
|
|
849
860
|
* 3.4 开始显示远端视频画面
|
|
850
861
|
*
|
|
@@ -880,8 +891,9 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
880
891
|
*
|
|
881
892
|
* @param {String} userId - 对方的用户标识
|
|
882
893
|
* @param {Boolean} mute - 是否停止接收
|
|
894
|
+
* @param {TRTCVideoStreamType} streamType - 视频流类型
|
|
883
895
|
*/
|
|
884
|
-
muteRemoteVideoStream(userId: string, mute: boolean): void;
|
|
896
|
+
muteRemoteVideoStream(userId: string, mute: boolean, streamType?: TRTCVideoStreamType): void;
|
|
885
897
|
/**
|
|
886
898
|
* 3.8 停止接收所有远端视频流
|
|
887
899
|
*
|
|
@@ -1160,10 +1172,15 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1160
1172
|
* 注意:录音文件路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式。
|
|
1161
1173
|
* 例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
|
|
1162
1174
|
*
|
|
1163
|
-
* @param {
|
|
1175
|
+
* @param {TRTCAudioRecordingParams} params - 录音参数。
|
|
1176
|
+
* @param {String} params.filePath - 文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写
|
|
1177
|
+
* @param {TRTCAudioRecordingContent} params.recordingContent - 音频录制内容类型
|
|
1164
1178
|
* @return {Number} 0:成功;-1:录音已开始;-2:文件或目录创建失败;-3:后缀指定的音频格式不支持
|
|
1179
|
+
*
|
|
1180
|
+
* 注意:
|
|
1181
|
+
* - 在 9.3 之前的版本,params 为 string 代表 录音文件路径(必填), 9.3 以及以后同时支持 string 类型和 TRTCAudioRecordingParams。
|
|
1165
1182
|
*/
|
|
1166
|
-
startAudioRecording(
|
|
1183
|
+
startAudioRecording(params: TRTCAudioRecordingParams | string): number;
|
|
1167
1184
|
/**
|
|
1168
1185
|
* 4.13 停止录音
|
|
1169
1186
|
*
|
|
@@ -1428,6 +1445,11 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1428
1445
|
* - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
|
|
1429
1446
|
* - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
1430
1447
|
*
|
|
1448
|
+
* @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
|
|
1449
|
+
* @param {Rect} captureRect - 指定捕获的区域
|
|
1450
|
+
* @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
|
|
1451
|
+
*
|
|
1452
|
+
* 废弃参数使用方法(针对 9.3 以下版本):
|
|
1431
1453
|
* @param {TRTCScreenCaptureSourceType} type - 采集源类型
|
|
1432
1454
|
* - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
|
|
1433
1455
|
* - TRTCScreenCaptureSourceTypeScreen: 该分享目标是整个Windows桌面
|
|
@@ -1442,7 +1464,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1442
1464
|
* @param {Boolean} captureMouse - 指定是否捕获鼠标指针
|
|
1443
1465
|
* @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
|
|
1444
1466
|
*/
|
|
1445
|
-
selectScreenCaptureTarget(
|
|
1467
|
+
selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean): any;
|
|
1446
1468
|
/**
|
|
1447
1469
|
* 8.7 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。(暂不支持 mac 平台预览界面)
|
|
1448
1470
|
*
|
|
@@ -1861,13 +1883,21 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1861
1883
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
1862
1884
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
1863
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
|
-
* @
|
|
1867
|
-
* @param {String} userId - 用户标识
|
|
1868
|
-
* @param {String} userSig - 用户签名
|
|
1898
|
+
* @return 接口调用结果,< 0:失败
|
|
1869
1899
|
*/
|
|
1870
|
-
startSpeedTest(
|
|
1900
|
+
startSpeedTest(params: TRTCSpeedTestParams | number, userId?: string, userSig?: string): any;
|
|
1871
1901
|
/**
|
|
1872
1902
|
* 13.2 停止网络测速
|
|
1873
1903
|
*/
|
package/liteav/trtc.js
CHANGED
|
@@ -342,6 +342,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
342
342
|
this.bindOnNetworkQuality();
|
|
343
343
|
this.bindOnStatistics();
|
|
344
344
|
this.bindOnSpeedTest();
|
|
345
|
+
this.bindOnSpeedTestResult();
|
|
345
346
|
this.bindOnUserVoiceVolume();
|
|
346
347
|
this.bindOnRecvCustomCmdMsg();
|
|
347
348
|
this.bindOnMissCustomCmdMsg();
|
|
@@ -707,7 +708,9 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
707
708
|
this.fire('onConnectionRecovery');
|
|
708
709
|
}
|
|
709
710
|
/**
|
|
710
|
-
* 5.4
|
|
711
|
+
* 5.4 废弃事件:服务器测速的回调,SDK 对多个服务器 IP 做测速,每个 IP 的测速结果通过这个回调通知
|
|
712
|
+
*
|
|
713
|
+
* @deprecated 从 TRTCSDK 9.3 后该接口已被废弃,不会抛出该事件, 请采用 onSpeedTestResult 事件代替
|
|
711
714
|
*
|
|
712
715
|
* @event TRTCCallback#onSpeedTest
|
|
713
716
|
* @param {TRTCSpeedTestResult} currentResult - 当前完成的测速结果
|
|
@@ -719,6 +722,19 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
719
722
|
this.fire('onSpeedTest', currentResult, finishedCount, totalCount);
|
|
720
723
|
});
|
|
721
724
|
}
|
|
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
|
+
}
|
|
722
738
|
/////////////////////////////////////////////////////////////////////////////////
|
|
723
739
|
//
|
|
724
740
|
// (六)硬件设备事件回调
|
|
@@ -1451,8 +1467,12 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1451
1467
|
* 当屏蔽本地视频后,房间里的其它成员将会收到 onUserVideoAvailable 回调通知
|
|
1452
1468
|
* @param {Boolean} mute - true:屏蔽;false:开启,默认值:false
|
|
1453
1469
|
*/
|
|
1454
|
-
muteLocalVideo(mute) {
|
|
1455
|
-
|
|
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);
|
|
1456
1476
|
}
|
|
1457
1477
|
/**
|
|
1458
1478
|
* 3.4 开始显示远端视频画面
|
|
@@ -1524,9 +1544,14 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1524
1544
|
*
|
|
1525
1545
|
* @param {String} userId - 对方的用户标识
|
|
1526
1546
|
* @param {Boolean} mute - 是否停止接收
|
|
1547
|
+
* @param {TRTCVideoStreamType} streamType - 视频流类型
|
|
1527
1548
|
*/
|
|
1528
|
-
muteRemoteVideoStream(userId, mute) {
|
|
1529
|
-
|
|
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);
|
|
1530
1555
|
}
|
|
1531
1556
|
/**
|
|
1532
1557
|
* 3.8 停止接收所有远端视频流
|
|
@@ -1931,11 +1956,25 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1931
1956
|
* 注意:录音文件路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式。
|
|
1932
1957
|
* 例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
|
|
1933
1958
|
*
|
|
1934
|
-
* @param {
|
|
1959
|
+
* @param {TRTCAudioRecordingParams} params - 录音参数。
|
|
1960
|
+
* @param {String} params.filePath - 文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写
|
|
1961
|
+
* @param {TRTCAudioRecordingContent} params.recordingContent - 音频录制内容类型
|
|
1935
1962
|
* @return {Number} 0:成功;-1:录音已开始;-2:文件或目录创建失败;-3:后缀指定的音频格式不支持
|
|
1963
|
+
*
|
|
1964
|
+
* 注意:
|
|
1965
|
+
* - 在 9.3 之前的版本,params 为 string 代表 录音文件路径(必填), 9.3 以及以后同时支持 string 类型和 TRTCAudioRecordingParams。
|
|
1936
1966
|
*/
|
|
1937
|
-
startAudioRecording(
|
|
1938
|
-
|
|
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;
|
|
1939
1978
|
}
|
|
1940
1979
|
/**
|
|
1941
1980
|
* 4.13 停止录音
|
|
@@ -2289,6 +2328,11 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2289
2328
|
* - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
|
|
2290
2329
|
* - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
2291
2330
|
*
|
|
2331
|
+
* @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
|
|
2332
|
+
* @param {Rect} captureRect - 指定捕获的区域
|
|
2333
|
+
* @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
|
|
2334
|
+
*
|
|
2335
|
+
* 废弃参数使用方法(针对 9.3 以下版本):
|
|
2292
2336
|
* @param {TRTCScreenCaptureSourceType} type - 采集源类型
|
|
2293
2337
|
* - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
|
|
2294
2338
|
* - TRTCScreenCaptureSourceTypeScreen: 该分享目标是整个Windows桌面
|
|
@@ -2303,9 +2347,20 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2303
2347
|
* @param {Boolean} captureMouse - 指定是否捕获鼠标指针
|
|
2304
2348
|
* @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
|
|
2305
2349
|
*/
|
|
2306
|
-
selectScreenCaptureTarget(
|
|
2307
|
-
if (sourceId
|
|
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
2364
|
}
|
|
2310
2365
|
else {
|
|
2311
2366
|
console.error('selectScreenCaptureTarget, sourceId or sourcename is undefined!');
|
|
@@ -2941,14 +2996,31 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2941
2996
|
* 测速结果将会用于优化 SDK 接下来的服务器选择策略,因此推荐您在用户首次通话前先进行一次测速,这将有助于我们选择最佳的服务器。
|
|
2942
2997
|
* 同时,如果测试结果非常不理想,您可以通过醒目的 UI 提示用户选择更好的网络。
|
|
2943
2998
|
*
|
|
2944
|
-
*
|
|
2945
|
-
*
|
|
2946
|
-
*
|
|
2947
|
-
*
|
|
2948
|
-
*
|
|
2949
|
-
|
|
2950
|
-
|
|
2951
|
-
|
|
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;
|
|
2952
3024
|
}
|
|
2953
3025
|
/**
|
|
2954
3026
|
* 13.2 停止网络测速
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -142,7 +142,29 @@ 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
|
|
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 设备信息
|
|
146
168
|
*
|
|
147
169
|
* @param {String} deviceId - 设备PID,字符编码格式是UTF-8
|
|
148
170
|
* @param {String} deviceName - 设备名称,字符编码格式是UTF-8
|
|
@@ -154,7 +176,7 @@ export declare class TRTCDeviceInfo {
|
|
|
154
176
|
constructor(deviceId?: string, deviceName?: string);
|
|
155
177
|
}
|
|
156
178
|
/**
|
|
157
|
-
* 3.
|
|
179
|
+
* 3.8 视频帧数据
|
|
158
180
|
*
|
|
159
181
|
* @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
|
|
160
182
|
* @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
|
|
@@ -357,6 +379,25 @@ export declare class TRTCVolumeInfo {
|
|
|
357
379
|
volume: number;
|
|
358
380
|
constructor(userId?: string, volume?: number);
|
|
359
381
|
}
|
|
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
|
+
}
|
|
360
401
|
/**
|
|
361
402
|
* 5.8 网络测速结果
|
|
362
403
|
*
|
|
@@ -438,8 +479,19 @@ export declare enum TRTCTranscodingConfigMode {
|
|
|
438
479
|
TRTC_TranscodingConfigMode_Template_PresetLayout = 8,
|
|
439
480
|
TRTC_TranscodingConfigMode_Template_ScreenSharing = 9
|
|
440
481
|
}
|
|
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
|
+
}
|
|
441
493
|
/**
|
|
442
|
-
* 5.
|
|
494
|
+
* 5.13 云端混流(转码)配置
|
|
443
495
|
*
|
|
444
496
|
* 包括最终编码质量和各路画面的摆放位置
|
|
445
497
|
*
|
|
@@ -496,7 +548,7 @@ export declare class TRTCTranscodingConfig {
|
|
|
496
548
|
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);
|
|
497
549
|
}
|
|
498
550
|
/**
|
|
499
|
-
* 5.
|
|
551
|
+
* 5.14 CDN 旁路推流参数
|
|
500
552
|
*
|
|
501
553
|
* @param {Number} appId - 腾讯云 AppID,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
|
|
502
554
|
* @param {Number} bizId - 腾讯云直播 bizId,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
|
|
@@ -510,17 +562,19 @@ export declare class TRTCPublishCDNParam {
|
|
|
510
562
|
constructor(appId?: number, bizId?: number, url?: null | string);
|
|
511
563
|
}
|
|
512
564
|
/**
|
|
513
|
-
* 5.
|
|
565
|
+
* 5.15 录音参数
|
|
514
566
|
*
|
|
515
567
|
* 请正确填写参数,确保录音文件顺利生成。
|
|
516
568
|
*
|
|
517
|
-
* @param {String} filePath
|
|
518
|
-
*
|
|
519
|
-
*
|
|
569
|
+
* @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
|
|
570
|
+
* 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
|
|
571
|
+
* @param {TRTCAudioRecordingContent} recordingContent - 【字段含义】音频录制内容类型。
|
|
572
|
+
* 【特别说明】默认录制所有本地和远端音频。
|
|
520
573
|
*/
|
|
521
574
|
export declare class TRTCAudioRecordingParams {
|
|
522
575
|
filePath: null | string;
|
|
523
|
-
|
|
576
|
+
recordingContent: TRTCAudioRecordingContent;
|
|
577
|
+
constructor(filePath?: null | string, recordingContent?: TRTCAudioRecordingContent);
|
|
524
578
|
}
|
|
525
579
|
/**
|
|
526
580
|
* 5.14 音效
|
package/liteav/trtc_define.js
CHANGED
|
@@ -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.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;
|
|
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;
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
//
|
|
12
12
|
// 【(一)视频相关枚举值定义】
|
|
@@ -539,7 +539,31 @@ class TRTCScreenCaptureSourceInfo {
|
|
|
539
539
|
exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
|
|
540
540
|
;
|
|
541
541
|
/**
|
|
542
|
-
* 3.6
|
|
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 设备信息
|
|
543
567
|
*
|
|
544
568
|
* @param {String} deviceId - 设备PID,字符编码格式是UTF-8
|
|
545
569
|
* @param {String} deviceName - 设备名称,字符编码格式是UTF-8
|
|
@@ -554,7 +578,7 @@ class TRTCDeviceInfo {
|
|
|
554
578
|
exports.TRTCDeviceInfo = TRTCDeviceInfo;
|
|
555
579
|
;
|
|
556
580
|
/**
|
|
557
|
-
* 3.
|
|
581
|
+
* 3.8 视频帧数据
|
|
558
582
|
*
|
|
559
583
|
* @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
|
|
560
584
|
* @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
|
|
@@ -861,6 +885,27 @@ class TRTCVolumeInfo {
|
|
|
861
885
|
}
|
|
862
886
|
exports.TRTCVolumeInfo = TRTCVolumeInfo;
|
|
863
887
|
;
|
|
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;
|
|
864
909
|
/**
|
|
865
910
|
* 5.8 网络测速结果
|
|
866
911
|
*
|
|
@@ -999,7 +1044,52 @@ var TRTCTranscodingConfigMode;
|
|
|
999
1044
|
})(TRTCTranscodingConfigMode = exports.TRTCTranscodingConfigMode || (exports.TRTCTranscodingConfigMode = {}));
|
|
1000
1045
|
;
|
|
1001
1046
|
/**
|
|
1002
|
-
* 5.11
|
|
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 云端混流(转码)配置
|
|
1003
1093
|
*
|
|
1004
1094
|
* 包括最终编码质量和各路画面的摆放位置
|
|
1005
1095
|
*
|
|
@@ -1059,7 +1149,7 @@ class TRTCTranscodingConfig {
|
|
|
1059
1149
|
exports.TRTCTranscodingConfig = TRTCTranscodingConfig;
|
|
1060
1150
|
;
|
|
1061
1151
|
/**
|
|
1062
|
-
* 5.
|
|
1152
|
+
* 5.14 CDN 旁路推流参数
|
|
1063
1153
|
*
|
|
1064
1154
|
* @param {Number} appId - 腾讯云 AppID,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
|
|
1065
1155
|
* @param {Number} bizId - 腾讯云直播 bizId,请在 [实时音视频控制台](https://console.cloud.tencent.com/rav) 选择已经创建的应用,单击【帐号信息】后,在“直播信息”中获取
|
|
@@ -1076,17 +1166,19 @@ class TRTCPublishCDNParam {
|
|
|
1076
1166
|
exports.TRTCPublishCDNParam = TRTCPublishCDNParam;
|
|
1077
1167
|
;
|
|
1078
1168
|
/**
|
|
1079
|
-
* 5.
|
|
1169
|
+
* 5.15 录音参数
|
|
1080
1170
|
*
|
|
1081
1171
|
* 请正确填写参数,确保录音文件顺利生成。
|
|
1082
1172
|
*
|
|
1083
|
-
* @param {String} filePath
|
|
1084
|
-
*
|
|
1085
|
-
*
|
|
1173
|
+
* @param {String} filePath - 【字段含义】文件路径(必填),录音文件的保存路径。该路径需要用户自行指定,请确保路径存在且可写。<br>
|
|
1174
|
+
* 【特别说明】该路径需精确到文件名及格式后缀,格式后缀决定录制文件的格式,例如:指定路径为 path/to/audio.aac,则会生成一个 AAC 格式的文件。目前支持的格式有 PCM, WAV, AAC
|
|
1175
|
+
* @param {TRTCAudioRecordingContent} recordingContent - 【字段含义】音频录制内容类型。
|
|
1176
|
+
* 【特别说明】默认录制所有本地和远端音频。
|
|
1086
1177
|
*/
|
|
1087
1178
|
class TRTCAudioRecordingParams {
|
|
1088
|
-
constructor(filePath = null) {
|
|
1179
|
+
constructor(filePath = null, recordingContent = TRTCAudioRecordingContent.TRTCAudioRecordingContentAll) {
|
|
1089
1180
|
this.filePath = filePath;
|
|
1181
|
+
this.recordingContent = recordingContent;
|
|
1090
1182
|
}
|
|
1091
1183
|
}
|
|
1092
1184
|
exports.TRTCAudioRecordingParams = TRTCAudioRecordingParams;
|