trtc-electron-sdk 11.3.502-beta.0 → 11.3.502-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 CHANGED
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  import { EventEmitter } from 'events';
3
3
  import { VodPlayer } from './vod_player';
4
- import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer } from './trtc_define';
4
+ import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer, TRTCInitConfig } from './trtc_define';
5
5
  export * from './trtc_define';
6
6
  export * from './trtc_code';
7
7
  export * from './vod_player';
@@ -48,12 +48,12 @@ declare class TRTCCloud extends EventEmitter {
48
48
  private audioQuality;
49
49
  private bgmId;
50
50
  private playAudioEffectIdList;
51
- constructor();
51
+ constructor(config?: TRTCInitConfig);
52
52
  /**
53
53
  * 创建 TRTCCloud 对象单例
54
54
  * @returns {TRTCCloud}
55
55
  */
56
- static getTRTCShareInstance(): TRTCCloud;
56
+ static getTRTCShareInstance(config?: TRTCInitConfig): TRTCCloud;
57
57
  /**
58
58
  * 释放 TRTCCloud 对象并清理资源
59
59
  */
package/liteav/trtc.js CHANGED
@@ -130,9 +130,6 @@ const getComponentNO = function () {
130
130
  case 'TUIRoom':
131
131
  componentNO = '5';
132
132
  break;
133
- case 'TUIRoomKit':
134
- componentNO = '16';
135
- break;
136
133
  default:
137
134
  break;
138
135
  }
@@ -154,10 +151,10 @@ let oriRtcCloud = null;
154
151
  */
155
152
  class TRTCCloud extends events_1.EventEmitter {
156
153
  // 兼容 8.0 以下版本, 记录内部状态变量 --end
157
- constructor() {
154
+ constructor(config) {
158
155
  super();
159
156
  const componentNO = getComponentNO();
160
- oriRtcCloud = new trtc.NodeRTCCloud(pkg.version, componentNO);
157
+ oriRtcCloud = new trtc.NodeRTCCloud(Object.assign({ jsVersion: pkg.version, componentNO }, config));
161
158
  this.rtcCloud = Object.assign({}, oriRtcCloud, {
162
159
  onlineLog: undefined
163
160
  });
@@ -205,9 +202,9 @@ class TRTCCloud extends events_1.EventEmitter {
205
202
  * 创建 TRTCCloud 对象单例
206
203
  * @returns {TRTCCloud}
207
204
  */
208
- static getTRTCShareInstance() {
205
+ static getTRTCShareInstance(config) {
209
206
  if (!trtcCloudInstance) {
210
- trtcCloudInstance = new TRTCCloud();
207
+ trtcCloudInstance = new TRTCCloud(config);
211
208
  }
212
209
  return trtcCloudInstance;
213
210
  }
@@ -142,9 +142,9 @@ export declare class TRTCImageBuffer {
142
142
  * @param {TRTCImageBuffer} thumbBGRA - 缩略图内容
143
143
  * @param {TRTCImageBuffer} iconBGRA - 图标内容
144
144
  * @param {Boolean} isMinimizeWindow - 是否最小化窗口
145
- * @param {Number} width - 屏幕/窗口宽,单位:像素。目前仅支持微软 `Windows` 操作系统。
146
- * @param {Number} height - 屏幕/窗口高,单位:像素。目前仅支持微软 `Windows` 操作系统。
147
- * @param {Boolean} isMainScreen - 是否为主显示屏。目前仅支持微软 `Windows` 操作系统。
145
+ * @param {Number} width - 屏幕/窗口宽,单位:像素。
146
+ * @param {Number} height - 屏幕/窗口高,单位:像素。
147
+ * @param {Boolean} isMainScreen - 是否为主显示屏。
148
148
  *
149
149
  */
150
150
  export declare class TRTCScreenCaptureSourceInfo {
@@ -822,3 +822,16 @@ export declare class VideoBufferInfo {
822
822
  pixelFormat: TRTCVideoPixelFormat;
823
823
  });
824
824
  }
825
+ export interface TRTCInitConfig {
826
+ networkProxy?: {
827
+ host: string;
828
+ port: number;
829
+ username: string;
830
+ password: string;
831
+ config: {
832
+ supportHttps: boolean;
833
+ supportTcp: boolean;
834
+ supportUdp: boolean;
835
+ };
836
+ };
837
+ }
@@ -553,9 +553,9 @@ exports.TRTCImageBuffer = TRTCImageBuffer;
553
553
  * @param {TRTCImageBuffer} thumbBGRA - 缩略图内容
554
554
  * @param {TRTCImageBuffer} iconBGRA - 图标内容
555
555
  * @param {Boolean} isMinimizeWindow - 是否最小化窗口
556
- * @param {Number} width - 屏幕/窗口宽,单位:像素。目前仅支持微软 `Windows` 操作系统。
557
- * @param {Number} height - 屏幕/窗口高,单位:像素。目前仅支持微软 `Windows` 操作系统。
558
- * @param {Boolean} isMainScreen - 是否为主显示屏。目前仅支持微软 `Windows` 操作系统。
556
+ * @param {Number} width - 屏幕/窗口宽,单位:像素。
557
+ * @param {Number} height - 屏幕/窗口高,单位:像素。
558
+ * @param {Boolean} isMainScreen - 是否为主显示屏。
559
559
  *
560
560
  */
561
561
  class TRTCScreenCaptureSourceInfo {
@@ -1,4 +1,5 @@
1
1
  export declare function isNumber(args: any): boolean;
2
+ export declare function isString(args: any): boolean;
2
3
  export declare function isNull(args: any): boolean;
3
4
  export declare function isUndefined(args: any): boolean;
4
5
  export declare function isExist(args: any): boolean;
@@ -1,10 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.isExist = exports.isUndefined = exports.isNull = exports.isNumber = void 0;
3
+ exports.isExist = exports.isUndefined = exports.isNull = exports.isString = exports.isNumber = void 0;
4
4
  function isNumber(args) {
5
5
  return typeof args === 'number';
6
6
  }
7
7
  exports.isNumber = isNumber;
8
+ function isString(args) {
9
+ return typeof args === 'string';
10
+ }
11
+ exports.isString = isString;
8
12
  function isNull(args) {
9
13
  return args === null;
10
14
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "11.3.502-beta.0",
3
+ "version": "11.3.502-beta.2",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",