trtc-electron-sdk 12.0.605 → 12.1.607

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.js CHANGED
@@ -36,6 +36,7 @@ const trtc_define_1 = require("./trtc_define");
36
36
  const validate_util_1 = require("./validate-util");
37
37
  const logger_1 = __importStar(require("./logger"));
38
38
  const LocalVideoRenderController_1 = __importDefault(require("./VideoRenderControl/LocalVideoRenderController"));
39
+ const VideoRenderFPSMonitor_1 = require("./VideoRenderControl/VideoRenderFPSMonitor");
39
40
  const NodeTRTCEngine = require('../build/Release/trtc_electron_sdk.node');
40
41
  const pkg = require('../package.json');
41
42
  __exportStar(require("./trtc_define"), exports);
@@ -204,8 +205,9 @@ class TRTCCloud extends events_1.EventEmitter {
204
205
  };
205
206
  // 本地合图插件
206
207
  // this.localMediaTranscoder = null;
207
- this.videoRenderFPS = 15;
208
- this.setVideoRenderFPS(this.videoRenderFPS);
208
+ this.videoRenderFPS = 60;
209
+ this.onFPSChanged = this.onFPSChanged.bind(this);
210
+ VideoRenderFPSMonitor_1.videoRenderFPSMonitor.on('videoRenderFPS', this.onFPSChanged);
209
211
  this.callExperimentalAPI("{\"api\":\"setCurrentEnvironment\",\"params\" :{\"electron\":true}}");
210
212
  this._localVideoRenderCallback = this._localVideoRenderCallback.bind(this);
211
213
  this._remoteVideoRenderCallback = this._remoteVideoRenderCallback.bind(this);
@@ -241,6 +243,10 @@ class TRTCCloud extends events_1.EventEmitter {
241
243
  TRTCCloud.sharedTRTCCloudInstance = null;
242
244
  }
243
245
  }
246
+ onFPSChanged(options) {
247
+ this.videoRenderFPS = options.videoFPS !== -1 ? options.videoFPS : 60;
248
+ this.rtcCloud.setVideoRenderFPS(this.videoRenderFPS);
249
+ }
244
250
  /**
245
251
  * 创建子实例
246
252
  *
@@ -310,6 +316,7 @@ class TRTCCloud extends events_1.EventEmitter {
310
316
  else {
311
317
  TRTCCloud.subInstances = TRTCCloud.subInstances.filter((item) => { return item != this; });
312
318
  }
319
+ VideoRenderFPSMonitor_1.videoRenderFPSMonitor.off('videoRenderFPS', this.onFPSChanged);
313
320
  this.playAudioEffectIdList = [];
314
321
  this.remoteFillModeMap.clear();
315
322
  this.rtcCloud.destroy();
@@ -863,17 +870,6 @@ class TRTCCloud extends events_1.EventEmitter {
863
870
  * @param {TRTCStatistics} statis - 统计数据,包括本地和远程的
864
871
  */
865
872
  handleOnStatistics(statis) {
866
- if (statis.systemCpu >= 95 && this.videoRenderFPS !== 5) {
867
- this.setVideoRenderFPS(5);
868
- }
869
- else if (statis.systemCpu >= 80 && this.videoRenderFPS !== 10) {
870
- this.setVideoRenderFPS(10);
871
- }
872
- else {
873
- if (this.videoRenderFPS < 15) {
874
- this.setVideoRenderFPS(15);
875
- }
876
- }
877
873
  this.fire('onStatistics', statis);
878
874
  }
879
875
  /////////////////////////////////////////////////////////////////////////////////
@@ -2120,6 +2116,7 @@ class TRTCCloud extends events_1.EventEmitter {
2120
2116
  * @param {Number} params.videoFps - 视频采集帧率
2121
2117
  * @param {Number} params.videoBitrate - 视频上行码率
2122
2118
  * @param {Number} params.minVideoBitrate - 视频最小码率
2119
+ * @param {Boolean} params.enableAdjustRes - 是否允许动态调整分辨率,默认值:关闭。
2123
2120
  */
2124
2121
  setVideoEncoderParam(params) {
2125
2122
  if (params instanceof trtc_define_1.TRTCVideoEncParam) {
@@ -2406,11 +2403,6 @@ class TRTCCloud extends events_1.EventEmitter {
2406
2403
  stopLocalRecording() {
2407
2404
  this.rtcCloud.stopLocalRecording();
2408
2405
  }
2409
- setVideoRenderFPS(fps) {
2410
- const valid_fps = fps >= 5 ? fps : 5;
2411
- this.videoRenderFPS = valid_fps;
2412
- this.rtcCloud.setVideoRenderFPS(this.videoRenderFPS);
2413
- }
2414
2406
  /////////////////////////////////////////////////////////////////////////////////
2415
2407
  //
2416
2408
  // (四)音频相关接口函数
@@ -3022,8 +3014,8 @@ class TRTCCloud extends events_1.EventEmitter {
3022
3014
  * true, // enable capture mouse
3023
3015
  * true, // enable highlight
3024
3016
  * true, // enable high performance
3025
- * 0, // default highlight color. On Mac, can only be '0', do not support customizing color.
3026
- * 0, // default highlight width
3017
+ * 0xFF66FF, // highlight color.
3018
+ * 8, // highlight width
3027
3019
  * false // disable capture child window
3028
3020
  * );
3029
3021
  *
@@ -3811,18 +3803,74 @@ class TRTCCloud extends events_1.EventEmitter {
3811
3803
  setMusicPublishVolume(id, volume) {
3812
3804
  this.rtcCloud.setMusicPublishVolume(id, volume);
3813
3805
  }
3806
+ /**
3807
+ * 开启耳返
3808
+ *
3809
+ * 主播开启耳返后,可以在耳机里听到麦克风采集到的自己发出的声音,该特效适用于主播唱歌的应用场景中。
3810
+ *
3811
+ * 需要您注意的是,由于蓝牙耳机的硬件延迟非常高,所以在主播佩戴蓝牙耳机时无法开启此特效,请尽量在用户界面上提示主播佩戴有线耳机。同时也需要注意,并非所有的手机开启此特效后都能达到优秀的耳返效果,我们已经对部分耳返效果不佳的手机屏蔽了该特效。
3812
+ * @param {Boolean} enable - 是否开启耳返。
3813
+ */
3814
+ enableVoiceEarMonitor(enable) {
3815
+ this.rtcCloud.enableVoiceEarMonitor(enable);
3816
+ }
3817
+ /**
3818
+ * 设置耳返音量
3819
+ *
3820
+ * 通过该接口您可以设置耳返特效中声音的音量大小。
3821
+ *
3822
+ * 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
3823
+ * @param {Number} volumn - 音量大小,取值范围为0 - 100,默认值:100。
3824
+ */
3825
+ setVoiceEarMonitorVolume(volumn) {
3826
+ this.rtcCloud.setVoiceEarMonitorVolume(volumn);
3827
+ }
3828
+ /**
3829
+ * 设置语音音量
3830
+ *
3831
+ * 该接口可以设置语音音量的大小,一般配合音乐音量的设置接口 setAllMusicVolume 协同使用,用于调谐语音和音乐在混音前各自的音量占比。
3832
+ *
3833
+ * 如果将 volume 设置成 100 之后感觉音量还是太小,可以将 volume 最大设置成 150,但超过 100 的 volume 会有爆音的风险,请谨慎操作。
3834
+ * @param {Number} volume - 音量大小,取值范围为0 - 100,默认值:100。
3835
+ */
3836
+ setVoiceCaptureVolume(volume) {
3837
+ this.rtcCloud.setVoiceCaptureVolume(volume);
3838
+ }
3839
+ /**
3840
+ * 设置语音音调
3841
+ *
3842
+ * 该接口可以设置语音音调,用于实现变调不变速的目的。
3843
+ * @param {Number} pitch - 音调,取值范围为-1.0f~1.0f,默认值:0.0f。
3844
+ */
3845
+ setVoicePitch(pitch) {
3846
+ if (pitch < -1.0 || pitch > 1.0) {
3847
+ throw new Error('pitch is out of range [-1.0, 1.0]');
3848
+ }
3849
+ this.rtcCloud.setVoicePitch(pitch);
3850
+ }
3814
3851
  /**
3815
3852
  * 设置人声的混响效果
3816
3853
  *
3817
- * 通过该接口您可以设置人声的混响效果,具体特效请参见枚举定义
3854
+ * 通过该接口您可以设置人声的混响效果,具体特效请参见枚举定义。
3818
3855
  *
3819
3856
  * 注意:设置的效果在退出房间后会自动失效,如果下次进房还需要对应特效,需要调用此接口再次进行设置。
3820
3857
  *
3821
- * @param {TRTCVoiceReverbType} type - 人声的混响效果类型
3858
+ * @param {TRTCVoiceReverbType} type - 人声的混响效果类型。
3822
3859
  */
3823
3860
  setVoiceReverbType(type) {
3824
3861
  this.rtcCloud.setVoiceReverbType(type);
3825
3862
  }
3863
+ /**
3864
+ * 设置人声的变声效果
3865
+ *
3866
+ * 通过该接口您可以设置人声的变声效果,具体特效请参见枚举定义
3867
+ *
3868
+ * 注意:设置的效果在退出房间后会自动失效,如果下次进房还需要对应特效,需要调用此接口再次进行设置
3869
+ * @param {TRTCVoiceChangerType} type - 人声的变声效果类型 。
3870
+ */
3871
+ setVoiceChangerType(type) {
3872
+ this.rtcCloud.setVoiceChangerType(type);
3873
+ }
3826
3874
  /////////////////////////////////////////////////////////////////////////////////
3827
3875
  //
3828
3876
  // (十二)音效相关接口函数
@@ -4096,6 +4144,7 @@ class TRTCCloud extends events_1.EventEmitter {
4096
4144
  * - TRTCLogLevelFatal : 只输出 FATAL 级别的 Log
4097
4145
  */
4098
4146
  setLogLevel(level) {
4147
+ logger_1.default.setLogLevel(level);
4099
4148
  this.logger.setLogLevel(level);
4100
4149
  this.rtcCloud.setLogLevel(level);
4101
4150
  }
@@ -4121,10 +4170,12 @@ class TRTCCloud extends events_1.EventEmitter {
4121
4170
  /**
4122
4171
  * 设置日志保存路径
4123
4172
  *
4124
- * 注意:
4125
- * - windows 日志文件默认保存在 C:/Users/[系统用户名]/AppData/Roaming/Tencent/liteav/log,即 %appdata%/Tencent/liteav/log 下,如需修改,必须在所有方法前调用。
4173
+ * 通过该接口您可以更改 SDK 本地日志的默认存储路径,SDK 默认的本地日志的存储位置:
4174
+ * - windows 日志文件默认保存在 C:/Users/[系统用户名]/AppData/Roaming/liteav/log,即 %appdata%/liteav/log 下,如需修改,必须在所有方法前调用。
4126
4175
  * - mac 日志文件默认保存在 sandbox Documents/log 下,如需修改,必须在所有方法前调用。
4127
4176
  *
4177
+ * 注意:请务必在所有其他接口之前调用,并且保证您指定的目录是存在的,并且您的应用程序拥有对该目录的读写权限。
4178
+ *
4128
4179
  * @param {String} path - 存储日志的文件夹,例如 "D:\\Log",UTF-8 编码
4129
4180
  */
4130
4181
  setLogDirPath(path) {
@@ -4242,7 +4293,7 @@ class TRTCCloud extends events_1.EventEmitter {
4242
4293
  * 调用 [addPlugin]{@link TRTCCloud#addPlugin} 接口添加插件前,需要先调用本接口设置配置参数,否则插件不会启动、运行。
4243
4294
  *
4244
4295
  * @param type {TRTCPluginType} - 插件类型
4245
- * @param config {TRTCBeautyPluginEnvConfig | TRTCMediaEncryptDecryptPluginOptions} - 插件配置参数
4296
+ * @param config {TRTCVideoProcessPluginOptions | TRTCMediaEncryptDecryptPluginOptions | TRTCAudioProcessPluginOptions} - 插件配置参数
4246
4297
  */
4247
4298
  setPluginParams(type, options) {
4248
4299
  this.logger.log(`setPluginParams params:`, type, options);
@@ -4341,7 +4392,7 @@ class TRTCCloud extends events_1.EventEmitter {
4341
4392
  * - pluginId - 插件ID
4342
4393
  * - errorCode - 错误码。0、-1、-2、-3、-4、-5 是 SDK 内部定义错误码,其它错误码是插件自定义错误码。
4343
4394
  * - 0 表示 addPlugin 成功
4344
- * - -1 插件库错误
4395
+ * - -1 插件库加载失败
4345
4396
  * - -2 插件库缺少插件创建函数
4346
4397
  * - -3 创建函数执行失败
4347
4398
  * - -4 插件初始化函数执行失败
@@ -174,7 +174,7 @@ export declare class TRTCScreenCaptureSourceInfo {
174
174
  * @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
175
175
  * @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
176
176
  * @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
177
- * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26MacOS 平台不支持。
177
+ * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 0xFFE640
178
178
  * @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5 像素,您可以设置的最大值为 50。
179
179
  * @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
180
180
  */
@@ -364,12 +364,9 @@ export declare class TRTCParams {
364
364
  * 【特别说明】<br>
365
365
  * - 当您把分辨率设置的比较高时,minVideoBitrate 不适合设置的太低,否则会出现画面模糊和大范围的马赛克宏块。
366
366
  * 比如把分辨率设置为 720p,把码率设置为 200kbps,那么编码出的画面将会出现大范围区域性马赛克。
367
- * @param {Boolean} enableAdjustRes - 【字段含义】是否允许调整分辨率<br>
368
- * 【推荐取值】 <br>
369
- * - 手机直播建议选择 NO。<br>
370
- * - 视频通话模式,若更关注流畅性,建议选择 YES,此时若遇到带宽有限的弱网,SDK 会自动降低分辨率以保障更好的流畅度(仅针对 TRTCVideoStreamTypeBig 生效)。
371
- * - 默认值:NO。<br>
372
- * 【特别说明】若有录制需求,选择 YES 时,请确保通话过程中,调整分辨率不会影响您的录制效果。<br>
367
+ * @param {Boolean} enableAdjustRes - 【字段含义】是否允许动态调整分辨率(开启后会对云端录制产生影响)<br>
368
+ * 【推荐取值】该功能适用于不需要云端录制的场景,开启后 SDK 会根据当前网络情况,智能选择出一个合适的分辨率,避免出现“大分辨率+小码率”的低效编码模式。<br>
369
+ * 【特别说明】默认值:关闭。如有云端录制的需求,请不要开启此功能,因为如果视频分辨率发生变化后,云端录制出的 MP4 在普通的播放器上无法正常播放。<br>
373
370
  */
374
371
  export declare class TRTCVideoEncParam {
375
372
  videoResolution: TRTCVideoResolution;
@@ -598,6 +595,20 @@ export declare enum TRTCVoiceReverbType {
598
595
  TRTCLiveVoiceReverbType_10 = 10,
599
596
  TRTCLiveVoiceReverbType_11 = 11
600
597
  }
598
+ export declare enum TRTCVoiceChangerType {
599
+ TRTCLiveVoiceChangerType_0 = 0,
600
+ TRTCLiveVoiceChangerType_1 = 1,
601
+ TRTCLiveVoiceChangerType_2 = 2,
602
+ TRTCLiveVoiceChangerType_3 = 3,
603
+ TRTCLiveVoiceChangerType_4 = 4,
604
+ TRTCLiveVoiceChangerType_5 = 5,
605
+ TRTCLiveVoiceChangerType_6 = 6,
606
+ TRTCLiveVoiceChangerType_7 = 7,
607
+ TRTCLiveVoiceChangerType_8 = 8,
608
+ TRTCLiveVoiceChangerType_9 = 9,
609
+ TRTCLiveVoiceChangerType_10 = 10,
610
+ TRTCLiveVoiceChangerType_11 = 11
611
+ }
601
612
  export declare enum TRTCPluginType {
602
613
  TRTCPluginTypeUnknown = 0,
603
614
  TRTCPluginTypeVideoProcess = 1,
@@ -612,22 +623,13 @@ export interface PluginInfo {
612
623
  setParameter: (param: string) => number;
613
624
  }
614
625
  export declare type TRTCPluginInfo = PluginInfo;
615
- /**
616
- * 视频处理插件选项
617
- */
618
626
  export declare type TRTCVideoProcessPluginOptions = {
619
627
  enable?: boolean;
620
628
  pixelFormat?: TRTCVideoPixelFormat;
621
629
  };
622
- /**
623
- * 音视频加解密插件选项
624
- */
625
630
  export declare type TRTCMediaEncryptDecryptPluginOptions = {
626
631
  enable?: boolean;
627
632
  };
628
- /**
629
- * 音频自定义处理插件选项
630
- */
631
633
  export declare type TRTCAudioProcessPluginOptions = {
632
634
  enable?: boolean;
633
635
  };
@@ -6,8 +6,8 @@
6
6
  *
7
7
  */
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
- exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCPluginType = exports.TRTCVoiceReverbType = 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.TRTCCameraCaptureMode = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCAudioFrame = 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.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 = void 0;
9
+ exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCPluginType = exports.TRTCVoiceChangerType = exports.TRTCVoiceReverbType = 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.TRTCCameraCaptureMode = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCAudioFrame = 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.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 = void 0;
11
11
  const util_1 = require("./Renderer/util");
12
12
  /////////////////////////////////////////////////////////////////////////////////
13
13
  //
@@ -600,7 +600,7 @@ exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
600
600
  * @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
601
601
  * @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
602
602
  * @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
603
- * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26MacOS 平台不支持。
603
+ * @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 0xFFE640
604
604
  * @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5 像素,您可以设置的最大值为 50。
605
605
  * @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
606
606
  */
@@ -909,12 +909,9 @@ exports.TRTCParams = TRTCParams;
909
909
  * 【特别说明】<br>
910
910
  * - 当您把分辨率设置的比较高时,minVideoBitrate 不适合设置的太低,否则会出现画面模糊和大范围的马赛克宏块。
911
911
  * 比如把分辨率设置为 720p,把码率设置为 200kbps,那么编码出的画面将会出现大范围区域性马赛克。
912
- * @param {Boolean} enableAdjustRes - 【字段含义】是否允许调整分辨率<br>
913
- * 【推荐取值】 <br>
914
- * - 手机直播建议选择 NO。<br>
915
- * - 视频通话模式,若更关注流畅性,建议选择 YES,此时若遇到带宽有限的弱网,SDK 会自动降低分辨率以保障更好的流畅度(仅针对 TRTCVideoStreamTypeBig 生效)。
916
- * - 默认值:NO。<br>
917
- * 【特别说明】若有录制需求,选择 YES 时,请确保通话过程中,调整分辨率不会影响您的录制效果。<br>
912
+ * @param {Boolean} enableAdjustRes - 【字段含义】是否允许动态调整分辨率(开启后会对云端录制产生影响)<br>
913
+ * 【推荐取值】该功能适用于不需要云端录制的场景,开启后 SDK 会根据当前网络情况,智能选择出一个合适的分辨率,避免出现“大分辨率+小码率”的低效编码模式。<br>
914
+ * 【特别说明】默认值:关闭。如有云端录制的需求,请不要开启此功能,因为如果视频分辨率发生变化后,云端录制出的 MP4 在普通的播放器上无法正常播放。<br>
918
915
  */
919
916
  class TRTCVideoEncParam {
920
917
  constructor(videoResolution = TRTCVideoResolution.TRTCVideoResolution_640_360, resMode = TRTCVideoResolutionMode.TRTCVideoResolutionModeLandscape, videoFps = 15, videoBitrate = 550, minVideoBitrate = 0, enableAdjustRes = false) {
@@ -1285,6 +1282,54 @@ var TRTCVoiceReverbType;
1285
1282
  TRTCVoiceReverbType[TRTCVoiceReverbType["TRTCLiveVoiceReverbType_10"] = 10] = "TRTCLiveVoiceReverbType_10";
1286
1283
  TRTCVoiceReverbType[TRTCVoiceReverbType["TRTCLiveVoiceReverbType_11"] = 11] = "TRTCLiveVoiceReverbType_11";
1287
1284
  })(TRTCVoiceReverbType = exports.TRTCVoiceReverbType || (exports.TRTCVoiceReverbType = {}));
1285
+ /**
1286
+ * 变声特效
1287
+ *
1288
+ * 变声特效可以作用于人声之上,通过声学算法对人声进行二次处理,以获得与原始声音所不同的音色,目前支持如下几种变声特效
1289
+ *
1290
+ * @enum {Number}
1291
+ */
1292
+ const TRTCVoiceChangerType_HACK_JSDOC = {
1293
+ /** 关闭特效 */
1294
+ TRTCLiveVoiceChangerType_0: 0,
1295
+ /** 熊孩子 */
1296
+ TRTCLiveVoiceChangerType_1: 1,
1297
+ /** 萝莉*/
1298
+ TRTCLiveVoiceChangerType_2: 2,
1299
+ /** 大叔 */
1300
+ TRTCLiveVoiceChangerType_3: 3,
1301
+ /** 重金属 */
1302
+ TRTCLiveVoiceChangerType_4: 4,
1303
+ /** 感冒 */
1304
+ TRTCLiveVoiceChangerType_5: 5,
1305
+ /** 外语腔 */
1306
+ TRTCLiveVoiceChangerType_6: 6,
1307
+ /** 困兽 */
1308
+ TRTCLiveVoiceChangerType_7: 7,
1309
+ /** 肥宅 */
1310
+ TRTCLiveVoiceChangerType_8: 8,
1311
+ /** 强电流 */
1312
+ TRTCLiveVoiceChangerType_9: 9,
1313
+ /** 重机械 */
1314
+ TRTCLiveVoiceChangerType_10: 10,
1315
+ /** 空灵 */
1316
+ TRTCLiveVoiceChangerType_11: 11,
1317
+ };
1318
+ var TRTCVoiceChangerType;
1319
+ (function (TRTCVoiceChangerType) {
1320
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_0"] = 0] = "TRTCLiveVoiceChangerType_0";
1321
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_1"] = 1] = "TRTCLiveVoiceChangerType_1";
1322
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_2"] = 2] = "TRTCLiveVoiceChangerType_2";
1323
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_3"] = 3] = "TRTCLiveVoiceChangerType_3";
1324
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_4"] = 4] = "TRTCLiveVoiceChangerType_4";
1325
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_5"] = 5] = "TRTCLiveVoiceChangerType_5";
1326
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_6"] = 6] = "TRTCLiveVoiceChangerType_6";
1327
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_7"] = 7] = "TRTCLiveVoiceChangerType_7";
1328
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_8"] = 8] = "TRTCLiveVoiceChangerType_8";
1329
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_9"] = 9] = "TRTCLiveVoiceChangerType_9";
1330
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_10"] = 10] = "TRTCLiveVoiceChangerType_10";
1331
+ TRTCVoiceChangerType[TRTCVoiceChangerType["TRTCLiveVoiceChangerType_11"] = 11] = "TRTCLiveVoiceChangerType_11";
1332
+ })(TRTCVoiceChangerType = exports.TRTCVoiceChangerType || (exports.TRTCVoiceChangerType = {}));
1288
1333
  /**
1289
1334
  * 插件类型
1290
1335
  *
@@ -1317,6 +1362,25 @@ var TRTCPluginType;
1317
1362
  * @property {Function} setParameter - 设置该插件的参数,返回值:0 成功,其他值表示失败,入参必须是序列化的 JSON 串,会透传到 C++ 插件层
1318
1363
  */
1319
1364
  const TRTCPluginInfo_HACK_JSDOC = null;
1365
+ /**
1366
+ * 视频处理插件选项
1367
+ * @typedef {Object} TRTCVideoProcessPluginOptions
1368
+ * @property {Boolean} enable - 是否开启
1369
+ * @property {TRTCVideoPixelFormat} pixelFormat - 视频格式
1370
+ */
1371
+ const TRTCVideoProcessPluginOptions_HACK_JSDOC = null;
1372
+ /**
1373
+ * 音视频加解密插件选项
1374
+ * @typedef {Object} TRTCMediaEncryptDecryptPluginOptions
1375
+ * @property {Boolean} enable - 是否开启
1376
+ */
1377
+ const TRTCMediaEncryptDecryptPluginOptions_HACK_JSDOC = null;
1378
+ /**
1379
+ * 音频自定义处理插件选项
1380
+ * @typedef {Object} TRTCAudioProcessPluginOptions
1381
+ * @property {Boolean} enable - 是否开启
1382
+ */
1383
+ const TRTCAudioProcessPluginOptions_HACK_JSDOC = null;
1320
1384
  /**
1321
1385
  * 云端混流(转码)配置
1322
1386
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "12.0.605",
3
+ "version": "12.1.607",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",
@@ -38,32 +38,38 @@
38
38
  "typescript": "^4.0.3"
39
39
  },
40
40
  "scripts": {
41
- "install": "npm run download",
41
+ "install": "npm run download ",
42
42
  "download": "node ./scripts/download.js",
43
43
  "postinstall": "node ./scripts/postinstall.js",
44
- "dev": "npm run build && npm run doc && npm run copy:sdk",
44
+ "dev": "npm run build && npm run doc && npm run copy:sdk ",
45
45
  "copy:sdk": "rimraf ./build && node ./scripts/copy-sdk.js",
46
- "build": "npm run build:types && npm run build:js && npm run copy:types && npm run copy:sdk",
46
+ "build": "npm run build:types && npm run build:js && npm run copy:types && npm run copy:sdk ",
47
47
  "build:types": "rimraf ./types && tsc -p dtsconfig.json",
48
48
  "build:js": "rimraf ./liteav && tsc -p tsconfig.json",
49
49
  "copy:types": "node ./scripts/copy-types.js",
50
- "watch": "npm run dev && npm run watch:js",
50
+ "watch": "npm run dev && npm run watch:js ",
51
51
  "watch:types": "rimraf ./types && tsc --watch -p dtsconfig.json",
52
52
  "watch:js": "rimraf ./liteav && tsc --watch -p tsconfig.json",
53
53
  "publish_doc": "node ./scripts/publish-doc.js",
54
- "doc": "npm run doc:clean && npm run doc:build",
55
- "doc:build": "npm run doc:build-zh && npm run doc:build-en",
54
+ "doc": "npm run doc:clean && npm run doc:build ",
55
+ "doc:build": "npm run doc:build-zh && npm run doc:build-en ",
56
56
  "doc:build-zh": "jsdoc -c ./jsdoc/jsdoc_zh.json && node ./jsdoc/fix-doc_zh.js",
57
57
  "doc:build-en": "jsdoc -c ./jsdoc/jsdoc_en.json && node ./jsdoc/fix-doc_en.js",
58
58
  "doc:clean": "node ./jsdoc/clean-doc.js",
59
- "prerelease": "npm run build && npm run doc && node ./scripts/prerelase.js",
59
+ "prerelease": "npm run build && npm run doc && node ./scripts/prerelase.js ",
60
60
  "publish_npm": "node scripts/publish-npm.js"
61
61
  },
62
62
  "repository": {
63
63
  "type": "git",
64
64
  "url": "git@git.code.oa.com:TRDCWeb/trtc-electron-sdk.git"
65
65
  },
66
- "keywords": [],
66
+ "keywords": [
67
+ "RTC",
68
+ "TRTC",
69
+ "Electron",
70
+ "Windows",
71
+ "Mac"
72
+ ],
67
73
  "author": "",
68
74
  "license": "ISC",
69
75
  "files": [
@@ -31,6 +31,10 @@ if (process.platform === "win32") {
31
31
  path.resolve(SDK_CPP_PATH, `src/remote-liteav/sdk/win/${dllPrefix}/lib/`),
32
32
  path.resolve(SDK_JS_PATH, "build/Release/")
33
33
  );
34
+ copySync(
35
+ path.resolve(SDK_CPP_PATH, `src/remote-liteav/sdk/remote_liteav/${dllPrefix}/`),
36
+ path.resolve(SDK_JS_PATH, "build/Release/")
37
+ );
34
38
  copySync(
35
39
  path.resolve(SDK_CPP_PATH, "build/Release/trtc_electron_sdk.pdb"),
36
40
  path.resolve(SDK_JS_PATH, "build/Release/trtc_electron_sdk.pdb")