trtc-electron-sdk 12.7.706-beta.2 → 12.8.707-alpha.0

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.
@@ -7,7 +7,13 @@ export declare enum TRTCLocalMediaTranscodingError {
7
7
  ImageSourceLoadFailed = -4,
8
8
  CameraNotAuthorized = -5,
9
9
  CameraIsOccupied = -6,
10
- CameraDisconnected = -7
10
+ CameraDisconnected = -7,
11
+ UnsupportedOnlineVideoProtocol = -8,
12
+ UnsupportedLocalVideoFileFormat = -9,
13
+ OnlineVideoConnectFailed = -10,
14
+ OnlineVideoConnectionLost = -11,
15
+ NoAvailableHevcDecoder = -12,
16
+ VideoFileNotExist = -13
11
17
  }
12
18
  export declare enum TRTCLocalMediaTranscodingSourceType {
13
19
  MediaSourceCamera = 0,
@@ -11,6 +11,12 @@ var TRTCLocalMediaTranscodingError;
11
11
  TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["CameraNotAuthorized"] = -5] = "CameraNotAuthorized";
12
12
  TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["CameraIsOccupied"] = -6] = "CameraIsOccupied";
13
13
  TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["CameraDisconnected"] = -7] = "CameraDisconnected";
14
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["UnsupportedOnlineVideoProtocol"] = -8] = "UnsupportedOnlineVideoProtocol";
15
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["UnsupportedLocalVideoFileFormat"] = -9] = "UnsupportedLocalVideoFileFormat";
16
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["OnlineVideoConnectFailed"] = -10] = "OnlineVideoConnectFailed";
17
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["OnlineVideoConnectionLost"] = -11] = "OnlineVideoConnectionLost";
18
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["NoAvailableHevcDecoder"] = -12] = "NoAvailableHevcDecoder";
19
+ TRTCLocalMediaTranscodingError[TRTCLocalMediaTranscodingError["VideoFileNotExist"] = -13] = "VideoFileNotExist";
14
20
  })(TRTCLocalMediaTranscodingError = exports.TRTCLocalMediaTranscodingError || (exports.TRTCLocalMediaTranscodingError = {}));
15
21
  var TRTCLocalMediaTranscodingSourceType;
16
22
  (function (TRTCLocalMediaTranscodingSourceType) {
@@ -1,5 +1,5 @@
1
1
  import { TRTCCameraCaptureParams, Rect, TRTCScreenCaptureProperty } from '../../trtc_define';
2
- import { TRTCMediaSource, TRTCMediaMixingEncParam, ITRTCMediaMixingManager, TRTCPhoneMirrorParam, TRTCStreamLayout } from './types';
2
+ import { TRTCMediaSource, TRTCMediaMixingEncParam, ITRTCMediaMixingManager, TRTCPhoneMirrorParam, TRTCStreamLayout, TRTCOnlineVideoParam, TRTCVideoFileParam } from './types';
3
3
  import { TRTCDeviceManager } from '../DeviceManager';
4
4
  declare const NodeTRTCEngine: any;
5
5
  /**
@@ -259,6 +259,18 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
259
259
  * @param property {TRTCScreenCaptureProperty} - 屏幕采集属性
260
260
  */
261
261
  setScreenCaptureProperty(screenOrWindowID: string, property: TRTCScreenCaptureProperty): void;
262
+ /**
263
+ * 设置在线视频源播放参数
264
+ * @param url {string} - 在线视频源 URL
265
+ * @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
266
+ */
267
+ setOnlineVideoParam(url: string, param: TRTCOnlineVideoParam): void;
268
+ /**
269
+ * 设置视频文件播放参数
270
+ * @param videoFilePath {string} - 视频文件路径
271
+ * @param param {TRTCVideoFileParam} - 视频文件播放参数
272
+ */
273
+ setVideoFileParam(videoFilePath: string, param: TRTCVideoFileParam): void;
262
274
  /**
263
275
  * 本地混流开始推流
264
276
  * @returns {Promise<void>}
@@ -45,6 +45,18 @@ const TRTCMediaMixingErrorCode_HACK_JSDOC = {
45
45
  CameraIsOccupied: 6,
46
46
  /** 摄像头断开连接 */
47
47
  CameraDisconnected: 7,
48
+ /** 不支持的协议类型 */
49
+ UnsupportedOnlineVideoProtocol: -8,
50
+ /** 不支持的文件格式 */
51
+ UnsupportedLocalVideoFileFormat: -9,
52
+ /** 无法连接服务器 */
53
+ OnlineVideoConnectFailed: -10,
54
+ /** 连接断开 */
55
+ OnlineVideoConnectionLost: -11,
56
+ /** 不支持 HEVC 解码 */
57
+ NoAvailableHevcDecoder: -12,
58
+ /** 视频文件不存在 */
59
+ VideoFileNotExist: -13
48
60
  };
49
61
  /**
50
62
  * 媒体源类型
@@ -627,6 +639,22 @@ class TRTCMediaMixingManager {
627
639
  setScreenCaptureProperty(screenOrWindowID, property) {
628
640
  this.nodeMediaMixingPlugin.setScreenCaptureProperty(screenOrWindowID, property);
629
641
  }
642
+ /**
643
+ * 设置在线视频源播放参数
644
+ * @param url {string} - 在线视频源 URL
645
+ * @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
646
+ */
647
+ setOnlineVideoParam(url, param) {
648
+ this.nodeMediaMixingPlugin.setOnlineVideoParam(url, param);
649
+ }
650
+ /**
651
+ * 设置视频文件播放参数
652
+ * @param videoFilePath {string} - 视频文件路径
653
+ * @param param {TRTCVideoFileParam} - 视频文件播放参数
654
+ */
655
+ setVideoFileParam(videoFilePath, param) {
656
+ this.nodeMediaMixingPlugin.setVideoFileParam(videoFilePath, param);
657
+ }
630
658
  /**
631
659
  * 本地混流开始推流
632
660
  * @returns {Promise<void>}
@@ -7,13 +7,21 @@ export declare enum TRTCMediaMixingErrorCode {
7
7
  ImageSourceLoadFailed = -4,
8
8
  CameraNotAuthorized = -5,
9
9
  CameraIsOccupied = -6,
10
- CameraDisconnected = -7
10
+ CameraDisconnected = -7,
11
+ UnsupportedOnlineVideoProtocol = -8,
12
+ UnsupportedLocalVideoFileFormat = -9,
13
+ OnlineVideoConnectFailed = -10,
14
+ OnlineVideoConnectionLost = -11,
15
+ NoAvailableHevcDecoder = -12,
16
+ VideoFileNotExist = -13
11
17
  }
12
18
  export declare enum TRTCMediaSourceType {
13
19
  kCamera = 0,
14
20
  kScreen = 1,
15
21
  kImage = 2,
16
- kPhoneMirror = 4
22
+ kPhoneMirror = 4,
23
+ kOnlineVideo = 5,
24
+ kVideoFile = 6
17
25
  }
18
26
  export declare type TRTCPhoneMirrorParam = {
19
27
  platformType: number;
@@ -68,6 +76,13 @@ export declare type TRTCStreamLayout = {
68
76
  };
69
77
  streams?: Array<TRTCStreamInfo>;
70
78
  };
79
+ export declare type TRTCOnlineVideoParam = {
80
+ networkCacheSizeKB: number;
81
+ playoutVolume: number;
82
+ };
83
+ export declare type TRTCVideoFileParam = {
84
+ playoutVolume: number;
85
+ };
71
86
  export interface ITRTCMediaMixingManager {
72
87
  addMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
73
88
  removeMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
@@ -11,6 +11,12 @@ var TRTCMediaMixingErrorCode;
11
11
  TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["CameraNotAuthorized"] = -5] = "CameraNotAuthorized";
12
12
  TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["CameraIsOccupied"] = -6] = "CameraIsOccupied";
13
13
  TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["CameraDisconnected"] = -7] = "CameraDisconnected";
14
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["UnsupportedOnlineVideoProtocol"] = -8] = "UnsupportedOnlineVideoProtocol";
15
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["UnsupportedLocalVideoFileFormat"] = -9] = "UnsupportedLocalVideoFileFormat";
16
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["OnlineVideoConnectFailed"] = -10] = "OnlineVideoConnectFailed";
17
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["OnlineVideoConnectionLost"] = -11] = "OnlineVideoConnectionLost";
18
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["NoAvailableHevcDecoder"] = -12] = "NoAvailableHevcDecoder";
19
+ TRTCMediaMixingErrorCode[TRTCMediaMixingErrorCode["VideoFileNotExist"] = -13] = "VideoFileNotExist";
14
20
  })(TRTCMediaMixingErrorCode = exports.TRTCMediaMixingErrorCode || (exports.TRTCMediaMixingErrorCode = {}));
15
21
  var TRTCMediaSourceType;
16
22
  (function (TRTCMediaSourceType) {
@@ -18,6 +24,8 @@ var TRTCMediaSourceType;
18
24
  TRTCMediaSourceType[TRTCMediaSourceType["kScreen"] = 1] = "kScreen";
19
25
  TRTCMediaSourceType[TRTCMediaSourceType["kImage"] = 2] = "kImage";
20
26
  TRTCMediaSourceType[TRTCMediaSourceType["kPhoneMirror"] = 4] = "kPhoneMirror";
27
+ TRTCMediaSourceType[TRTCMediaSourceType["kOnlineVideo"] = 5] = "kOnlineVideo";
28
+ TRTCMediaSourceType[TRTCMediaSourceType["kVideoFile"] = 6] = "kVideoFile";
21
29
  })(TRTCMediaSourceType = exports.TRTCMediaSourceType || (exports.TRTCMediaSourceType = {}));
22
30
  var TRTCStreamLayoutMode;
23
31
  (function (TRTCStreamLayoutMode) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "12.7.706-beta.2",
3
+ "version": "12.8.707-alpha.0",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/index.js",
6
6
  "types": "./liteav/index.d.ts",