trtc-electron-sdk 13.3.802-beta.0 → 13.4.120-beta.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.
@@ -54,6 +54,8 @@ export declare enum TRTCMediaMixingEvent {
54
54
  onError = "onError",
55
55
  /**
56
56
  * @description 设备插入事件
57
+ * @deprecated
58
+ * @private
57
59
  *
58
60
  * @event TRTCMediaMixingEvent#onSourcePlugged
59
61
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -62,6 +64,8 @@ export declare enum TRTCMediaMixingEvent {
62
64
  onSourcePlugged = "onSourcePlugged",
63
65
  /**
64
66
  * @description 设备链接事件
67
+ * @deprecated
68
+ * @private
65
69
  *
66
70
  * @event TRTCMediaMixingEvent#onSourceConnected
67
71
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -70,6 +74,8 @@ export declare enum TRTCMediaMixingEvent {
70
74
  onSourceConnected = "onSourceConnected",
71
75
  /**
72
76
  * @description 设备断开链接事件
77
+ * @deprecated
78
+ * @private
73
79
  *
74
80
  * @event TRTCMediaMixingEvent#onSourceDisconnected
75
81
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -78,6 +84,8 @@ export declare enum TRTCMediaMixingEvent {
78
84
  onSourceDisconnected = "onSourceDisconnected",
79
85
  /**
80
86
  * @description 设备拔出事件
87
+ * @deprecated
88
+ * @private
81
89
  *
82
90
  * @event TRTCMediaMixingEvent#onSourceUnplugged
83
91
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -248,13 +256,6 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
248
256
  * @returns {Promise<void>}
249
257
  */
250
258
  addMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
251
- /**
252
- * Returns the per-sourceType timeout (ms) used by addMediaSource. The
253
- * defaults are intentionally larger than the cpp-layer timeout in
254
- * SourceManagerProxy so that, in the normal case, the cpp side resolves the
255
- * promise first. This JS timer is the last-resort safety net in case the
256
- * cpp side itself fails to emit any callback (older builds, ipc lost, etc.).
257
- */
258
259
  private getAddMediaSourceTimeoutMs;
259
260
  /**
260
261
  * 删除本地混流媒体源
@@ -271,41 +272,46 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
271
272
  */
272
273
  updateMediaSource(mediaSource: TRTCMediaSource): Promise<void>;
273
274
  /**
274
- * @deprecated
275
- *
276
275
  * 设置摄像头采集参数
276
+ *
277
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
278
+ *
277
279
  * @param cameraID {string} - 摄像头 ID
278
280
  * @param params {TRTCCameraCaptureParams} - 摄像头采集参数
279
281
  */
280
282
  setCameraCaptureParam(cameraID: string, params: TRTCCameraCaptureParams): void;
281
283
  /**
282
- * @deprecated
283
284
  * 设置手机投屏参数
285
+ *
286
+ * @deprecated
284
287
  * @private
285
288
  * @param phoneMirrorSourceId {string} - 手机投屏媒体源 ID
286
289
  * @param param {TRTCPhoneMirrorParam} - 手机投屏参数
287
290
  */
288
291
  setPhoneMirrorParam(phoneMirrorSourceId: string, param: TRTCPhoneMirrorParam): void;
289
292
  /**
290
- * @deprecated
291
- *
292
293
  * 设置屏幕采集参数
294
+ *
295
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
296
+ *
293
297
  * @param screenOrWindowID {String} - 屏幕 ID 或 窗口 ID
294
298
  * @param property {TRTCScreenCaptureProperty} - 屏幕采集属性
295
299
  */
296
300
  setScreenCaptureProperty(screenOrWindowID: string, property: TRTCScreenCaptureProperty): void;
297
301
  /**
298
- * @deprecated
299
- *
300
302
  * 设置在线视频源播放参数
303
+ *
304
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
305
+ *
301
306
  * @param url {string} - 在线视频源 URL
302
307
  * @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
303
308
  */
304
309
  setOnlineVideoParam(url: string, param: TRTCOnlineVideoParam): void;
305
310
  /**
306
- * @deprecated
307
- *
308
311
  * 设置视频文件播放参数
312
+ *
313
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
314
+ *
309
315
  * @param videoFilePath {string} - 视频文件路径
310
316
  * @param param {TRTCVideoFileParam} - 视频文件播放参数
311
317
  */
@@ -92,6 +92,21 @@ const TRTCMediaSourceType_HACK_JSDOC = {
92
92
  *
93
93
  */
94
94
  const TRTCPhoneMirrorParam_HACK_JSDOC = null;
95
+ /**
96
+ * 在线视频播放参数
97
+ *
98
+ * @typedef {Object} TRTCOnlineVideoParam
99
+ * @property {Number} networkCacheSizeKB 网络缓存大小,单位 KB
100
+ * @property {Number} playoutVolume 播放音量,取值 0 - 100
101
+ */
102
+ const TRTCOnlineVideoParam_HACK_JSDOC = null;
103
+ /**
104
+ * 本地视频文件播放参数
105
+ *
106
+ * @typedef {Object} TRTCVideoFileParam
107
+ * @property {Number} playoutVolume 播放音量,取值 0 - 100
108
+ */
109
+ const TRTCVideoFileParam_HACK_JSDOC = null;
95
110
  /**
96
111
  * 媒体源数据
97
112
  *
@@ -99,12 +114,16 @@ const TRTCPhoneMirrorParam_HACK_JSDOC = null;
99
114
  * @property {TRTCMediaSourceType} sourceType 媒体源类型
100
115
  * @property {String} sourceId 媒体源唯一 ID
101
116
  * @property {Number} zOrder 媒体源展示层级,取值 0 - 15
117
+ * @property {Boolean} enableGreenScreen 是否开启绿幕(仅在 sourceType 为 kCamera 时生效),可选属性
102
118
  * @property {Rect} rect 媒体源显示区域
103
119
  * @property {Boolean} isSelected 媒体源是否选中,可选属性,默认:false
104
120
  * @property {TRTCVideoRotation} rotation 媒体源选中角度,可选属性
105
121
  * @property {TRTCVideoFillMode} fillMode 媒体源显示模式,可选属性,默认 `TRTCVideoFillMode_Fit`
106
122
  * @property {TRTCVideoMirrorType} mirrorType 媒体源是否镜像,可选属性,默认不镜像
107
- * @property {TRTCPhoneMirrorConnectionParam} connectionParam 手机投屏类型媒体源,连接参数
123
+ * @property {TRTCCameraCaptureParams} camera 摄像头采集参数,仅在 sourceType 为 kCamera 时生效,可选属性
124
+ * @property {TRTCScreenCaptureProperty} screen 屏幕/窗口采集属性,仅在 sourceType 为 kScreen 时生效,可选属性
125
+ * @property {TRTCVideoFileParam} localVideo 本地视频文件播放参数,仅在 sourceType 为 kVideoFile 时生效,可选属性
126
+ * @property {TRTCOnlineVideoParam} onlineVideo 在线视频播放参数,仅在 sourceType 为 kOnlineVideo 时生效,可选属性
108
127
  */
109
128
  const TRTCMediaSource_HACK_JSDOC = null;
110
129
  /**
@@ -133,20 +152,20 @@ const TRTCStreamLayoutMode_HACK_JSDOC = {
133
152
  * 单路连麦视频流布局信息
134
153
  *
135
154
  * 本地混流高性能渲染模式下,单路视频流布局信息
136
- * @typedef {Object} TRTCStreamInfo
155
+ * @typedef {Object} TRTCUserStream
137
156
  * @property {String} userId 用户 ID,本地用户需填空字符长
138
157
  * @property {TRTCVideoFillMode} fillMode 视频填充模式
139
158
  * @property {Rect} rect 视频流显示区域
140
159
  * @property {Number} zOrder 视频流展示层级,取值 0 - 15
141
160
  */
142
- const TRTCStreamInfo_HACK_JSDOC = null;
161
+ const TRTCUserStream_HACK_JSDOC = null;
143
162
  /**
144
163
  * 连麦视频流布局信息
145
164
  *
146
165
  * 本地混流高性能渲染模式下,所有视频流布局信息
147
166
  * @typedef {Object} TRTCStreamLayout
148
167
  * @property {TRTCStreamLayoutMode} layoutMode 布局模式
149
- * @property {Array<TRTCStreamInfo>} userList 非必填,用户视频流布局
168
+ * @property {Array<TRTCUserStream>} userList 非必填,用户视频流布局
150
169
  */
151
170
  const TRTCStreamLayout_HACK_JSDOC = null;
152
171
  const initResolutionMap = () => {
@@ -217,6 +236,8 @@ var TRTCMediaMixingEvent;
217
236
  TRTCMediaMixingEvent["onError"] = "onError";
218
237
  /**
219
238
  * @description 设备插入事件
239
+ * @deprecated
240
+ * @private
220
241
  *
221
242
  * @event TRTCMediaMixingEvent#onSourcePlugged
222
243
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -225,6 +246,8 @@ var TRTCMediaMixingEvent;
225
246
  TRTCMediaMixingEvent["onSourcePlugged"] = "onSourcePlugged";
226
247
  /**
227
248
  * @description 设备链接事件
249
+ * @deprecated
250
+ * @private
228
251
  *
229
252
  * @event TRTCMediaMixingEvent#onSourceConnected
230
253
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -233,6 +256,8 @@ var TRTCMediaMixingEvent;
233
256
  TRTCMediaMixingEvent["onSourceConnected"] = "onSourceConnected";
234
257
  /**
235
258
  * @description 设备断开链接事件
259
+ * @deprecated
260
+ * @private
236
261
  *
237
262
  * @event TRTCMediaMixingEvent#onSourceDisconnected
238
263
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -241,6 +266,8 @@ var TRTCMediaMixingEvent;
241
266
  TRTCMediaMixingEvent["onSourceDisconnected"] = "onSourceDisconnected";
242
267
  /**
243
268
  * @description 设备拔出事件
269
+ * @deprecated
270
+ * @private
244
271
  *
245
272
  * @event TRTCMediaMixingEvent#onSourceUnplugged
246
273
  * @param {TRTCPhoneMirrorParam} source 投屏手机状态信息
@@ -621,13 +648,6 @@ class TRTCMediaMixingManager {
621
648
  });
622
649
  });
623
650
  }
624
- /**
625
- * Returns the per-sourceType timeout (ms) used by addMediaSource. The
626
- * defaults are intentionally larger than the cpp-layer timeout in
627
- * SourceManagerProxy so that, in the normal case, the cpp side resolves the
628
- * promise first. This JS timer is the last-resort safety net in case the
629
- * cpp side itself fails to emit any callback (older builds, ipc lost, etc.).
630
- */
631
651
  getAddMediaSourceTimeoutMs(sourceType) {
632
652
  switch (sourceType) {
633
653
  case types_1.TRTCMediaSourceType.kOnlineVideo:
@@ -724,9 +744,10 @@ class TRTCMediaMixingManager {
724
744
  });
725
745
  }
726
746
  /**
727
- * @deprecated
728
- *
729
747
  * 设置摄像头采集参数
748
+ *
749
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
750
+ *
730
751
  * @param cameraID {string} - 摄像头 ID
731
752
  * @param params {TRTCCameraCaptureParams} - 摄像头采集参数
732
753
  */
@@ -744,8 +765,9 @@ class TRTCMediaMixingManager {
744
765
  }
745
766
  }
746
767
  /**
747
- * @deprecated
748
768
  * 设置手机投屏参数
769
+ *
770
+ * @deprecated
749
771
  * @private
750
772
  * @param phoneMirrorSourceId {string} - 手机投屏媒体源 ID
751
773
  * @param param {TRTCPhoneMirrorParam} - 手机投屏参数
@@ -754,9 +776,10 @@ class TRTCMediaMixingManager {
754
776
  this.nodeMediaMixingPlugin.setPhoneMirrorParam(phoneMirrorSourceId, param);
755
777
  }
756
778
  /**
757
- * @deprecated
758
- *
759
779
  * 设置屏幕采集参数
780
+ *
781
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
782
+ *
760
783
  * @param screenOrWindowID {String} - 屏幕 ID 或 窗口 ID
761
784
  * @param property {TRTCScreenCaptureProperty} - 屏幕采集属性
762
785
  */
@@ -764,9 +787,10 @@ class TRTCMediaMixingManager {
764
787
  this.nodeMediaMixingPlugin.setScreenCaptureProperty(screenOrWindowID, property);
765
788
  }
766
789
  /**
767
- * @deprecated
768
- *
769
790
  * 设置在线视频源播放参数
791
+ *
792
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
793
+ *
770
794
  * @param url {string} - 在线视频源 URL
771
795
  * @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
772
796
  */
@@ -774,9 +798,10 @@ class TRTCMediaMixingManager {
774
798
  this.nodeMediaMixingPlugin.setOnlineVideoParam(url, param);
775
799
  }
776
800
  /**
777
- * @deprecated
778
- *
779
801
  * 设置视频文件播放参数
802
+ *
803
+ * @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
804
+ *
780
805
  * @param videoFilePath {string} - 视频文件路径
781
806
  * @param param {TRTCVideoFileParam} - 视频文件播放参数
782
807
  */
package/liteav/trtc.js CHANGED
@@ -5434,6 +5434,10 @@ class TRTCCloud extends events_1.EventEmitter {
5434
5434
  try {
5435
5435
  const json = JSON.parse(jsonStr);
5436
5436
  const { api, params } = json;
5437
+ if (this._isMacPlatform() && api === 'TuikitLog') {
5438
+ this.logger.info(`TuikitLog: ${jsonStr}`);
5439
+ return;
5440
+ }
5437
5441
  if (this[api] && typeof this[api] === 'function') {
5438
5442
  this[api](params);
5439
5443
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "13.3.802-beta.0",
3
+ "version": "13.4.120-beta.0",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/index.js",
6
6
  "types": "./liteav/index.d.ts",