trtc-electron-sdk 10.3.8-beta.2 → 10.3.8-beta.21

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.
@@ -63,10 +63,7 @@ export declare enum TRTCVideoPixelFormat {
63
63
  TRTCVideoPixelFormat_Unknown = 0,
64
64
  TRTCVideoPixelFormat_I420 = 1,
65
65
  TRTCVideoPixelFormat_BGRA32 = 3,
66
- /** RGBA */
67
- TRTCVideoPixelFormat_RGBA32 = 5,
68
- /** H264 */
69
- TRTCVideoPixelFormat_H264 = 6
66
+ TRTCVideoPixelFormat_RGBA32 = 5
70
67
  }
71
68
  export declare enum TRTCVideoBufferType {
72
69
  TRTCVideoBufferType_Unknown = 0,
@@ -377,12 +374,14 @@ export declare class TRTCQualityInfo {
377
374
  *
378
375
  * @param {String} userId - 说话者的 userId,字符编码格式是 UTF-8
379
376
  * @param {Number} volume - 说话者的音量, 取值范围0 - 100
377
+ * @param {Number} vad - 是否检测到人声。0:非人声 1:人声 -1: 不支持检测 (mac 平台暂不支持)
380
378
  *
381
379
  */
382
380
  export declare class TRTCVolumeInfo {
383
381
  userId: string;
384
382
  volume: number;
385
- constructor(userId?: string, volume?: number);
383
+ vad: number;
384
+ constructor(userId?: string, volume?: number, vad?: number);
386
385
  }
387
386
  /**
388
387
  * 5.7 测速参数
@@ -590,7 +589,7 @@ export declare class TRTCAudioRecordingParams {
590
589
  constructor(filePath?: null | string, recordingContent?: TRTCAudioRecordingContent);
591
590
  }
592
591
  /**
593
- * 5.14 音效
592
+ * 5.16 音效
594
593
  *
595
594
  * @param {Number} effectId - 【字段含义】音效 ID<br>
596
595
  * 【特殊说明】SDK 允许播放多路音效,因此需要音效 ID 进行标记,用于控制音效的开始、停止、音量等
@@ -763,6 +762,7 @@ export interface PluginInfo {
763
762
  getParameter: (paramKey: string) => string;
764
763
  }
765
764
  export interface VideoBufferInfo {
765
+ id: number;
766
766
  userId: string;
767
767
  buffer: Buffer | null;
768
768
  streamType: TRTCVideoStreamType;
@@ -257,9 +257,8 @@ const TRTCVideoPixelFormat_HACK_JSDOC = {
257
257
  // TRTCVideoPixelFormat_Texture_2D: 2,
258
258
  /** BGRA32 */
259
259
  TRTCVideoPixelFormat_BGRA32: 3,
260
- /** RGBA */
261
260
  TRTCVideoPixelFormat_RGBA32: 5,
262
- TRTCVideoPixelFormat_H264: 6,
261
+ // TRTCVideoPixelFormat_H264: 6,
263
262
  };
264
263
  var TRTCVideoPixelFormat;
265
264
  (function (TRTCVideoPixelFormat) {
@@ -267,10 +266,8 @@ var TRTCVideoPixelFormat;
267
266
  TRTCVideoPixelFormat[TRTCVideoPixelFormat["TRTCVideoPixelFormat_I420"] = 1] = "TRTCVideoPixelFormat_I420";
268
267
  // TRTCVideoPixelFormat_Texture_2D= 2,
269
268
  TRTCVideoPixelFormat[TRTCVideoPixelFormat["TRTCVideoPixelFormat_BGRA32"] = 3] = "TRTCVideoPixelFormat_BGRA32";
270
- /** RGBA */
271
269
  TRTCVideoPixelFormat[TRTCVideoPixelFormat["TRTCVideoPixelFormat_RGBA32"] = 5] = "TRTCVideoPixelFormat_RGBA32";
272
- /** H264 */
273
- TRTCVideoPixelFormat[TRTCVideoPixelFormat["TRTCVideoPixelFormat_H264"] = 6] = "TRTCVideoPixelFormat_H264";
270
+ // TRTCVideoPixelFormat_H264 = 6,
274
271
  })(TRTCVideoPixelFormat = exports.TRTCVideoPixelFormat || (exports.TRTCVideoPixelFormat = {}));
275
272
  ;
276
273
  /**
@@ -882,12 +879,14 @@ exports.TRTCQualityInfo = TRTCQualityInfo;
882
879
  *
883
880
  * @param {String} userId - 说话者的 userId,字符编码格式是 UTF-8
884
881
  * @param {Number} volume - 说话者的音量, 取值范围0 - 100
882
+ * @param {Number} vad - 是否检测到人声。0:非人声 1:人声 -1: 不支持检测 (mac 平台暂不支持)
885
883
  *
886
884
  */
887
885
  class TRTCVolumeInfo {
888
- constructor(userId = '', volume = 0) {
886
+ constructor(userId = '', volume = 0, vad = -1) {
889
887
  this.userId = userId;
890
888
  this.volume = volume;
889
+ this.vad = vad;
891
890
  }
892
891
  }
893
892
  exports.TRTCVolumeInfo = TRTCVolumeInfo;
@@ -1199,7 +1198,7 @@ class TRTCAudioRecordingParams {
1199
1198
  exports.TRTCAudioRecordingParams = TRTCAudioRecordingParams;
1200
1199
  ;
1201
1200
  /**
1202
- * 5.14 音效
1201
+ * 5.16 音效
1203
1202
  *
1204
1203
  * @param {Number} effectId - 【字段含义】音效 ID<br>
1205
1204
  * 【特殊说明】SDK 允许播放多路音效,因此需要音效 ID 进行标记,用于控制音效的开始、停止、音量等
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "10.3.8-beta.2",
3
+ "version": "10.3.8-beta.21",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",
@@ -3,6 +3,7 @@ const path = require('path');
3
3
  const fs = require('fs-extra');
4
4
  const rimraf = require('rimraf');
5
5
  const signale = require('signale');
6
+ const { exec } = require('child_process');
6
7
 
7
8
  const {
8
9
  readCliArgv,
@@ -11,7 +12,6 @@ const {
11
12
  detectOwnVersion,
12
13
  detectOwnName,
13
14
  } = require('./utils');
14
- const { Platform } = require('./constant');
15
15
 
16
16
  const buildDownloadInfo = () => {
17
17
  const configArgv = Object.assign({}, readCliArgv(), readArgvFromNpmEnv());
@@ -34,7 +34,6 @@ const buildDownloadInfo = () => {
34
34
  };
35
35
  };
36
36
 
37
- let downloadFrameworkSuccessCount = 0;
38
37
  const main = () => {
39
38
  const {
40
39
  packageVersion,
@@ -71,11 +70,10 @@ const main = () => {
71
70
  .then(() => {
72
71
  console.log('copy success!');
73
72
  rimraf.sync(outputDir);
74
- if (platform === Platform.MACOS) {
75
- const txFFmpegUrl = 'https://web.sdk.qcloud.com/trtc/electron/download/trtc-electron-sdk/mac-framework/TXFFmpeg.framework.zip';
76
- const txSoundTouchUrl = 'https://web.sdk.qcloud.com/trtc/electron/download/trtc-electron-sdk/mac-framework/TXSoundTouch.framework.zip';
77
- downloadFramework(txFFmpegUrl, outputDir, buildDir);
78
- downloadFramework(txSoundTouchUrl, outputDir, buildDir);
73
+
74
+ if (process.platform === 'darwin') {
75
+ // Mac 下完成文件下载后,执行该命令,同步文件到 Electron 目录下
76
+ exec(`rsync -a ../../node_modules/trtc-electron-sdk/build/mac-framework/ ../../node_modules/electron/dist/Electron.app/Contents/Frameworks`);
79
77
  }
80
78
  })
81
79
  .catch(err => console.error(err));
@@ -85,23 +83,4 @@ const main = () => {
85
83
  });
86
84
  };
87
85
 
88
- const downloadFramework = (url, outputDir, buildDir) => {
89
- download(url, outputDir, {
90
- strip: 0,
91
- extract: true
92
- }).then(() => {
93
- signale.success('Success', 'Download framework finished');
94
- downloadFrameworkSuccessCount++;
95
- rimraf.sync(path.join(outputDir, '__MACOSX'));
96
- const frameworkPath = path.join(buildDir, 'mac-framework');
97
- fs.mkdirpSync(frameworkPath);
98
- if (downloadFrameworkSuccessCount === 2) {
99
- fs.copySync(path.join(outputDir), frameworkPath);
100
- rimraf.sync(outputDir);
101
- }
102
- }).catch(err => {
103
- signale.fatal('Failed', err);
104
- });
105
- };
106
-
107
86
  main();