trtc-electron-sdk 13.4.802-beta.1 → 13.4.802-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 -1
- package/liteav/trtc.js +2 -2
- package/liteav/trtc_define.d.ts +8 -1
- package/liteav/trtc_define.js +26 -3
- package/package.json +1 -1
package/liteav/trtc.d.ts
CHANGED
|
@@ -2774,7 +2774,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2774
2774
|
* @param {String} params.userSig - 用户签名
|
|
2775
2775
|
* @param {Number} params.expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
2776
2776
|
* @param {Number} params.expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
2777
|
-
* @param {
|
|
2777
|
+
* @param {TRTCSpeedTestScene} params.scene - 测速场景
|
|
2778
2778
|
*
|
|
2779
2779
|
* @return 接口调用结果,< 0:失败
|
|
2780
2780
|
*/
|
package/liteav/trtc.js
CHANGED
|
@@ -4633,7 +4633,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4633
4633
|
* @param {String} params.userSig - 用户签名
|
|
4634
4634
|
* @param {Number} params.expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
4635
4635
|
* @param {Number} params.expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
4636
|
-
* @param {
|
|
4636
|
+
* @param {TRTCSpeedTestScene} params.scene - 测速场景
|
|
4637
4637
|
*
|
|
4638
4638
|
* @return 接口调用结果,< 0:失败
|
|
4639
4639
|
*/
|
|
@@ -4644,7 +4644,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4644
4644
|
if (userId !== undefined && userSig !== undefined) {
|
|
4645
4645
|
const sdkAppId = params;
|
|
4646
4646
|
const speedTestParams = new trtc_define_1.TRTCSpeedTestParams(sdkAppId, userId, userSig);
|
|
4647
|
-
return this.rtcCloud.startSpeedTest(
|
|
4647
|
+
return this.rtcCloud.startSpeedTest(speedTestParams);
|
|
4648
4648
|
}
|
|
4649
4649
|
this.logger.error('startSpeedTest, param is error');
|
|
4650
4650
|
return -1;
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -120,6 +120,11 @@ export declare enum TRTCAudioQuality {
|
|
|
120
120
|
TRTCAudioQualityDefault = 2,
|
|
121
121
|
TRTCAudioQualityMusic = 3
|
|
122
122
|
}
|
|
123
|
+
export declare enum TRTCSpeedTestScene {
|
|
124
|
+
TRTCSpeedTestScene_DelayTesting = 1,
|
|
125
|
+
TRTCSpeedTestScene_DelayAndBandwidthTesting = 2,
|
|
126
|
+
TRTCSpeedTestScene_OnlineChorusTesting = 3
|
|
127
|
+
}
|
|
123
128
|
/**
|
|
124
129
|
* 图缓存
|
|
125
130
|
*
|
|
@@ -488,6 +493,7 @@ export declare class TRTCVolumeInfo {
|
|
|
488
493
|
* @param {String} userSig - 用户签名
|
|
489
494
|
* @param {Number} expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
490
495
|
* @param {Number} expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
496
|
+
* @param {TRTCSpeedTestScene} scene - 测速场景。仅当 scene 为 TRTCSpeedTestScene_DelayAndBandwidthTesting 或 TRTCSpeedTestScene_OnlineChorusTesting 时才会测试上下行带宽(availableUpBandwidth / availableDownBandwidth)。默认 TRTCSpeedTestScene_DelayAndBandwidthTesting。
|
|
491
497
|
*/
|
|
492
498
|
export declare class TRTCSpeedTestParams {
|
|
493
499
|
sdkAppId: number;
|
|
@@ -495,7 +501,8 @@ export declare class TRTCSpeedTestParams {
|
|
|
495
501
|
userSig: string;
|
|
496
502
|
expectedUpBandwidth: number;
|
|
497
503
|
expectedDownBandwidth: number;
|
|
498
|
-
|
|
504
|
+
scene: TRTCSpeedTestScene;
|
|
505
|
+
constructor(sdkAppId?: number, userId?: string, userSig?: string, expectedUpBandwidth?: number, expectedDownBandwidth?: number, scene?: TRTCSpeedTestScene);
|
|
499
506
|
}
|
|
500
507
|
/**
|
|
501
508
|
* 网络测速结果
|
package/liteav/trtc_define.js
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.
|
|
10
|
-
exports.VideoBufferInfo = exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = void 0;
|
|
9
|
+
exports.TRTCPluginType = exports.TRTCVoiceChangerType = exports.TRTCVoiceReverbType = exports.TRTCPublishMode = 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.TRTCVideoEncodeComplexity = exports.TRTCVideoColorSpace = exports.TRTCVideoColorRange = exports.TRTCCameraCaptureMode = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCAudioFrame = exports.TRTCVideoFrame = exports.TRTCDeviceInfo = exports.TRTCScreenCaptureProperty = exports.TRTCScreenCaptureSourceInfo = exports.TRTCImageBuffer = exports.TRTCSpeedTestScene = exports.TRTCAudioQuality = exports.TRTCScreenCaptureSourceType = exports.TRTCAudioFrameFormat = exports.TRTCVideoQosPreference = exports.TRTCQosControlMode = exports.TRTCRoleType = exports.TRTCAppScene = exports.TRTCRecordType = exports.TRTCVideoMirrorType = exports.TRTCVideoBufferType = exports.TRTCVideoPixelFormat = exports.TRTCBeautyStyle = exports.TRTCVideoRotation = exports.TRTCVideoFillMode = exports.TRTCQuality = exports.TRTCVideoStreamType = exports.TRTCVideoResolutionMode = exports.TRTCVideoResolution = void 0;
|
|
10
|
+
exports.VideoBufferInfo = exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = void 0;
|
|
11
11
|
const util_1 = require("./Renderer/util");
|
|
12
12
|
/////////////////////////////////////////////////////////////////////////////////
|
|
13
13
|
//
|
|
@@ -523,6 +523,27 @@ var TRTCAudioQuality;
|
|
|
523
523
|
TRTCAudioQuality[TRTCAudioQuality["TRTCAudioQualityDefault"] = 2] = "TRTCAudioQualityDefault";
|
|
524
524
|
TRTCAudioQuality[TRTCAudioQuality["TRTCAudioQualityMusic"] = 3] = "TRTCAudioQualityMusic";
|
|
525
525
|
})(TRTCAudioQuality = exports.TRTCAudioQuality || (exports.TRTCAudioQuality = {}));
|
|
526
|
+
/**
|
|
527
|
+
* 测速场景
|
|
528
|
+
*
|
|
529
|
+
* @enum {Number}
|
|
530
|
+
*
|
|
531
|
+
* 该枚举类型用于测速场景选择。
|
|
532
|
+
*/
|
|
533
|
+
const TRTCSpeedTestScene_HACK_JSDOC = {
|
|
534
|
+
/** 延迟测试。 */
|
|
535
|
+
TRTCSpeedTestScene_DelayTesting: 1,
|
|
536
|
+
/** 延迟与带宽测试。 */
|
|
537
|
+
TRTCSpeedTestScene_DelayAndBandwidthTesting: 2,
|
|
538
|
+
/** 在线合唱测试。 */
|
|
539
|
+
TRTCSpeedTestScene_OnlineChorusTesting: 3,
|
|
540
|
+
};
|
|
541
|
+
var TRTCSpeedTestScene;
|
|
542
|
+
(function (TRTCSpeedTestScene) {
|
|
543
|
+
TRTCSpeedTestScene[TRTCSpeedTestScene["TRTCSpeedTestScene_DelayTesting"] = 1] = "TRTCSpeedTestScene_DelayTesting";
|
|
544
|
+
TRTCSpeedTestScene[TRTCSpeedTestScene["TRTCSpeedTestScene_DelayAndBandwidthTesting"] = 2] = "TRTCSpeedTestScene_DelayAndBandwidthTesting";
|
|
545
|
+
TRTCSpeedTestScene[TRTCSpeedTestScene["TRTCSpeedTestScene_OnlineChorusTesting"] = 3] = "TRTCSpeedTestScene_OnlineChorusTesting";
|
|
546
|
+
})(TRTCSpeedTestScene = exports.TRTCSpeedTestScene || (exports.TRTCSpeedTestScene = {}));
|
|
526
547
|
/**
|
|
527
548
|
* 图缓存
|
|
528
549
|
*
|
|
@@ -1064,14 +1085,16 @@ exports.TRTCVolumeInfo = TRTCVolumeInfo;
|
|
|
1064
1085
|
* @param {String} userSig - 用户签名
|
|
1065
1086
|
* @param {Number} expectedUpBandwidth - 预期的上行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
1066
1087
|
* @param {Number} expectedDownBandwidth - 预期的下行带宽(kbps,取值范围: 10 ~ 5000,为 0 时不测试)。
|
|
1088
|
+
* @param {TRTCSpeedTestScene} scene - 测速场景。仅当 scene 为 TRTCSpeedTestScene_DelayAndBandwidthTesting 或 TRTCSpeedTestScene_OnlineChorusTesting 时才会测试上下行带宽(availableUpBandwidth / availableDownBandwidth)。默认 TRTCSpeedTestScene_DelayAndBandwidthTesting。
|
|
1067
1089
|
*/
|
|
1068
1090
|
class TRTCSpeedTestParams {
|
|
1069
|
-
constructor(sdkAppId = 0, userId = '', userSig = '', expectedUpBandwidth = 0, expectedDownBandwidth = 0) {
|
|
1091
|
+
constructor(sdkAppId = 0, userId = '', userSig = '', expectedUpBandwidth = 0, expectedDownBandwidth = 0, scene = TRTCSpeedTestScene.TRTCSpeedTestScene_DelayAndBandwidthTesting) {
|
|
1070
1092
|
this.sdkAppId = sdkAppId;
|
|
1071
1093
|
this.userId = userId;
|
|
1072
1094
|
this.userSig = userSig;
|
|
1073
1095
|
this.expectedUpBandwidth = expectedUpBandwidth;
|
|
1074
1096
|
this.expectedDownBandwidth = expectedDownBandwidth;
|
|
1097
|
+
this.scene = scene;
|
|
1075
1098
|
}
|
|
1076
1099
|
}
|
|
1077
1100
|
exports.TRTCSpeedTestParams = TRTCSpeedTestParams;
|