trtc-electron-sdk 11.9.604-beta.2 → 11.9.604

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
@@ -2432,6 +2432,7 @@ declare class TRTCCloud extends EventEmitter {
2432
2432
  setPluginParams(type: TRTCPluginType, options: TRTCVideoProcessPluginOptions | TRTCMediaEncryptDecryptPluginOptions): void;
2433
2433
  private _setVideoProcessPluginParams;
2434
2434
  private _setMediaEncryptDecryptPluginParams;
2435
+ private _setAudioProcessPluginParams;
2435
2436
  /**
2436
2437
  * 添加插件
2437
2438
  *
@@ -2439,7 +2440,7 @@ declare class TRTCCloud extends EventEmitter {
2439
2440
  * @param options - 插件信息
2440
2441
  * @param options.id {String} - 插件ID,必填,多个插件之间不能重复。
2441
2442
  * @param options.path {String} - 插件库文件路径,必填。Windows 下为 ".dll" 文件,Mac 下为 ".dylib" 文件。
2442
- * @param options.type {TRTCPluginType} - 插件类型,1表示自定义美颜插件,2表示音视频自定义加解密插件。
2443
+ * @param options.type {TRTCPluginType} - 插件类型,1表示自定义美颜插件,2表示音视频自定义加解密插件, 3表示音频自定义处理插件。
2443
2444
  * @param [options.deviceId] {String} - 摄像头设备 ID,开启多个摄像头美颜时必填。
2444
2445
  * @returns {TRTCPluginInfo}
2445
2446
  *
package/liteav/trtc.js CHANGED
@@ -4254,6 +4254,9 @@ class TRTCCloud extends events_1.EventEmitter {
4254
4254
  case trtc_define_1.TRTCPluginType.TRTCPluginTypeMediaEncryptDecrypt:
4255
4255
  this._setMediaEncryptDecryptPluginParams(options);
4256
4256
  break;
4257
+ case trtc_define_1.TRTCPluginType.TRTCPluginTypeAudioProcess:
4258
+ this._setAudioProcessPluginParams(options);
4259
+ break;
4257
4260
  default:
4258
4261
  this.logger.log(`setPluginConfigParams invalid type:${type}`);
4259
4262
  break;
@@ -4285,6 +4288,11 @@ class TRTCCloud extends events_1.EventEmitter {
4285
4288
  this.rtcCloud.enableEncodedDataCustomProcess(!!options.enable);
4286
4289
  }
4287
4290
  }
4291
+ _setAudioProcessPluginParams(options) {
4292
+ if (options.enable !== undefined) {
4293
+ this.rtcCloud.enableAudioFrameCustomProcess(!!options.enable);
4294
+ }
4295
+ }
4288
4296
  /**
4289
4297
  * 添加插件
4290
4298
  *
@@ -4292,7 +4300,7 @@ class TRTCCloud extends events_1.EventEmitter {
4292
4300
  * @param options - 插件信息
4293
4301
  * @param options.id {String} - 插件ID,必填,多个插件之间不能重复。
4294
4302
  * @param options.path {String} - 插件库文件路径,必填。Windows 下为 ".dll" 文件,Mac 下为 ".dylib" 文件。
4295
- * @param options.type {TRTCPluginType} - 插件类型,1表示自定义美颜插件,2表示音视频自定义加解密插件。
4303
+ * @param options.type {TRTCPluginType} - 插件类型,1表示自定义美颜插件,2表示音视频自定义加解密插件, 3表示音频自定义处理插件。
4296
4304
  * @param [options.deviceId] {String} - 摄像头设备 ID,开启多个摄像头美颜时必填。
4297
4305
  * @returns {TRTCPluginInfo}
4298
4306
  *
@@ -601,7 +601,8 @@ export declare enum TRTCVoiceReverbType {
601
601
  export declare enum TRTCPluginType {
602
602
  TRTCPluginTypeUnknown = 0,
603
603
  TRTCPluginTypeVideoProcess = 1,
604
- TRTCPluginTypeMediaEncryptDecrypt = 2
604
+ TRTCPluginTypeMediaEncryptDecrypt = 2,
605
+ TRTCPluginTypeAudioProcess = 3
605
606
  }
606
607
  export interface PluginInfo {
607
608
  id: string;
@@ -624,6 +625,12 @@ export declare type TRTCVideoProcessPluginOptions = {
624
625
  export declare type TRTCMediaEncryptDecryptPluginOptions = {
625
626
  enable?: boolean;
626
627
  };
628
+ /**
629
+ * 音频自定义处理插件选项
630
+ */
631
+ export declare type TRTCAudioProcessPluginOptions = {
632
+ enable?: boolean;
633
+ };
627
634
  /**
628
635
  * 云端混流(转码)配置
629
636
  *
@@ -1297,12 +1297,15 @@ const TRTCPluginType_HACK_JSDOC = {
1297
1297
  TRTCPluginTypeVideoProcess: 1,
1298
1298
  /** 音视频加解密,可以实现自定义加解密 */
1299
1299
  TRTCPluginTypeMediaEncryptDecrypt: 2,
1300
+ /** 音频处理,可以实现自定义音频处理 */
1301
+ TRTCPluginTypeAudioProcess: 3,
1300
1302
  };
1301
1303
  var TRTCPluginType;
1302
1304
  (function (TRTCPluginType) {
1303
1305
  TRTCPluginType[TRTCPluginType["TRTCPluginTypeUnknown"] = 0] = "TRTCPluginTypeUnknown";
1304
1306
  TRTCPluginType[TRTCPluginType["TRTCPluginTypeVideoProcess"] = 1] = "TRTCPluginTypeVideoProcess";
1305
1307
  TRTCPluginType[TRTCPluginType["TRTCPluginTypeMediaEncryptDecrypt"] = 2] = "TRTCPluginTypeMediaEncryptDecrypt";
1308
+ TRTCPluginType[TRTCPluginType["TRTCPluginTypeAudioProcess"] = 3] = "TRTCPluginTypeAudioProcess";
1306
1309
  })(TRTCPluginType = exports.TRTCPluginType || (exports.TRTCPluginType = {}));
1307
1310
  /**
1308
1311
  * TRTC 插件信息
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "11.9.604-beta.2",
3
+ "version": "11.9.604",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",