trtc-electron-sdk 11.3.502-beta.0 → 11.3.502-beta.1
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 +3 -3
- package/liteav/trtc.js +4 -4
- package/liteav/trtc_define.d.ts +13 -0
- package/liteav/validate-util.d.ts +1 -0
- package/liteav/validate-util.js +5 -1
- package/package.json +1 -1
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
|
@@ -154,10 +154,10 @@ let oriRtcCloud = null;
|
|
|
154
154
|
*/
|
|
155
155
|
class TRTCCloud extends events_1.EventEmitter {
|
|
156
156
|
// 兼容 8.0 以下版本, 记录内部状态变量 --end
|
|
157
|
-
constructor() {
|
|
157
|
+
constructor(config) {
|
|
158
158
|
super();
|
|
159
159
|
const componentNO = getComponentNO();
|
|
160
|
-
oriRtcCloud = new trtc.NodeRTCCloud(pkg.version, componentNO);
|
|
160
|
+
oriRtcCloud = new trtc.NodeRTCCloud(Object.assign({ jsVersion: pkg.version, componentNO }, config));
|
|
161
161
|
this.rtcCloud = Object.assign({}, oriRtcCloud, {
|
|
162
162
|
onlineLog: undefined
|
|
163
163
|
});
|
|
@@ -205,9 +205,9 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
205
205
|
* 创建 TRTCCloud 对象单例
|
|
206
206
|
* @returns {TRTCCloud}
|
|
207
207
|
*/
|
|
208
|
-
static getTRTCShareInstance() {
|
|
208
|
+
static getTRTCShareInstance(config) {
|
|
209
209
|
if (!trtcCloudInstance) {
|
|
210
|
-
trtcCloudInstance = new TRTCCloud();
|
|
210
|
+
trtcCloudInstance = new TRTCCloud(config);
|
|
211
211
|
}
|
|
212
212
|
return trtcCloudInstance;
|
|
213
213
|
}
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -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
|
+
}
|
|
@@ -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;
|
package/liteav/validate-util.js
CHANGED
|
@@ -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
|
}
|