trtc-electron-sdk 13.0.709-alpha.1 → 13.0.709-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.
|
@@ -158,7 +158,7 @@ class TRTCMediaMixingDesigner {
|
|
|
158
158
|
(_a = this.eventEmitter) === null || _a === void 0 ? void 0 : _a.off(event, func);
|
|
159
159
|
}
|
|
160
160
|
destroy() {
|
|
161
|
-
var _a, _b, _c, _d
|
|
161
|
+
var _a, _b, _c, _d;
|
|
162
162
|
if (this.resizeObserver) {
|
|
163
163
|
if (this.container) {
|
|
164
164
|
this.resizeObserver.unobserve(this.container);
|
|
@@ -171,9 +171,9 @@ class TRTCMediaMixingDesigner {
|
|
|
171
171
|
this.movableHandler = null;
|
|
172
172
|
this.resizableHandler = null;
|
|
173
173
|
(_c = this.container) === null || _c === void 0 ? void 0 : _c.removeEventListener('contextmenu', this.onRightButtonClicked, false);
|
|
174
|
-
|
|
174
|
+
document.removeEventListener("mousedown", this.onContainerMousedown, false);
|
|
175
175
|
if (this.moveAndResizeOverlay) {
|
|
176
|
-
(
|
|
176
|
+
(_d = this.container) === null || _d === void 0 ? void 0 : _d.removeChild(this.moveAndResizeOverlay);
|
|
177
177
|
this.moveAndResizeOverlay = null;
|
|
178
178
|
}
|
|
179
179
|
this.container = null;
|
|
@@ -204,7 +204,7 @@ class TRTCMediaMixingDesigner {
|
|
|
204
204
|
this.onContainerMousedown = this.onContainerMousedown.bind(this);
|
|
205
205
|
this.onContainerMousemove = this.onContainerMousemove.bind(this);
|
|
206
206
|
this.onContainerMouseup = this.onContainerMouseup.bind(this);
|
|
207
|
-
|
|
207
|
+
document.addEventListener("mousedown", this.onContainerMousedown, false);
|
|
208
208
|
this.onRightButtonClicked = this.onRightButtonClicked.bind(this);
|
|
209
209
|
this.container.addEventListener('contextmenu', this.onRightButtonClicked, false);
|
|
210
210
|
}
|
|
@@ -405,29 +405,31 @@ class TRTCMediaMixingDesigner {
|
|
|
405
405
|
const target = event.target;
|
|
406
406
|
this.eventButton = event.button;
|
|
407
407
|
if (target && this.container) {
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
if (
|
|
424
|
-
|
|
408
|
+
if (this.container.contains(target)) {
|
|
409
|
+
// calc click point coordinates in mix video image
|
|
410
|
+
const containerBounds = this.container.getBoundingClientRect();
|
|
411
|
+
const xInPreviewImage = event.clientX - containerBounds.left - this.absoluteWorkingArea.left - this.previewLeft;
|
|
412
|
+
const yInPreviewImage = event.clientY - containerBounds.top - this.absoluteWorkingArea.top - this.previewTop;
|
|
413
|
+
const xInImage = xInPreviewImage / this.previewScale;
|
|
414
|
+
const yInImage = yInPreviewImage / this.previewScale;
|
|
415
|
+
for (let i = 0; i < this.mediaList.length; i++) {
|
|
416
|
+
const item = this.mediaList[i];
|
|
417
|
+
if (item.rect &&
|
|
418
|
+
xInImage >= item.rect.left &&
|
|
419
|
+
xInImage <= item.rect.right &&
|
|
420
|
+
yInImage >= item.rect.top &&
|
|
421
|
+
yInImage <= item.rect.bottom) {
|
|
422
|
+
this.clickedMediaSources.push(item);
|
|
423
|
+
if (this.mediaList[this.selectedMediaIndex]) {
|
|
424
|
+
if (item.id === this.mediaList[this.selectedMediaIndex].id) {
|
|
425
|
+
this.oldSelectedIndex = this.clickedMediaSources.length - 1;
|
|
426
|
+
}
|
|
425
427
|
}
|
|
426
428
|
}
|
|
427
429
|
}
|
|
430
|
+
this.mousedownLeft = event.screenX;
|
|
431
|
+
this.mousedownTop = event.screenY;
|
|
428
432
|
}
|
|
429
|
-
this.mousedownLeft = event.screenX;
|
|
430
|
-
this.mousedownTop = event.screenY;
|
|
431
433
|
if (this.clickedMediaSources.length > 0) {
|
|
432
434
|
if (this.eventButton === 2 && this.oldSelectedIndex === -1) {
|
|
433
435
|
// select first media source
|
|
@@ -262,6 +262,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
262
262
|
setCameraCaptureParam(cameraID: string, params: TRTCCameraCaptureParams): void;
|
|
263
263
|
/**
|
|
264
264
|
* 设置手机投屏参数
|
|
265
|
+
* @private
|
|
265
266
|
* @param phoneMirrorSourceId {string} - 手机投屏媒体源 ID
|
|
266
267
|
* @param param {TRTCPhoneMirrorParam} - 手机投屏参数
|
|
267
268
|
*/
|
|
@@ -73,6 +73,10 @@ const TRTCMediaSourceType_HACK_JSDOC = {
|
|
|
73
73
|
kImage: 2,
|
|
74
74
|
/** 手机投屏 */
|
|
75
75
|
kPhoneMirror: 4,
|
|
76
|
+
/** 在线视频 */
|
|
77
|
+
kOnlineVideo: 5,
|
|
78
|
+
/** 本地视频文件 */
|
|
79
|
+
kVideoFile: 6,
|
|
76
80
|
};
|
|
77
81
|
/**
|
|
78
82
|
* 手机投屏媒体源参数
|
|
@@ -648,6 +652,7 @@ class TRTCMediaMixingManager {
|
|
|
648
652
|
}
|
|
649
653
|
/**
|
|
650
654
|
* 设置手机投屏参数
|
|
655
|
+
* @private
|
|
651
656
|
* @param phoneMirrorSourceId {string} - 手机投屏媒体源 ID
|
|
652
657
|
* @param param {TRTCPhoneMirrorParam} - 手机投屏参数
|
|
653
658
|
*/
|
package/liteav/trtc.d.ts
CHANGED
|
@@ -1369,7 +1369,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1369
1369
|
* @param {TRTCVideoResolutionMode} params.resMode - 分辨率模式(横屏分辨率 - 竖屏分辨率)
|
|
1370
1370
|
* - TRTCVideoResolutionModeLandscape: 横屏分辨率
|
|
1371
1371
|
* - TRTCVideoResolutionModePortrait : 竖屏分辨率
|
|
1372
|
-
* @param {Number} params.videoFps -
|
|
1372
|
+
* @param {Number} params.videoFps - 视频编码帧率
|
|
1373
1373
|
* @param {Number} params.videoBitrate - 视频上行码率
|
|
1374
1374
|
* @param {Number} params.minVideoBitrate - 视频最小码率
|
|
1375
1375
|
* @param {Boolean} params.enableAdjustRes - 是否允许动态调整分辨率,默认值:关闭。
|
package/liteav/trtc.js
CHANGED
|
@@ -2543,7 +2543,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2543
2543
|
* @param {TRTCVideoResolutionMode} params.resMode - 分辨率模式(横屏分辨率 - 竖屏分辨率)
|
|
2544
2544
|
* - TRTCVideoResolutionModeLandscape: 横屏分辨率
|
|
2545
2545
|
* - TRTCVideoResolutionModePortrait : 竖屏分辨率
|
|
2546
|
-
* @param {Number} params.videoFps -
|
|
2546
|
+
* @param {Number} params.videoFps - 视频编码帧率
|
|
2547
2547
|
* @param {Number} params.videoBitrate - 视频上行码率
|
|
2548
2548
|
* @param {Number} params.minVideoBitrate - 视频最小码率
|
|
2549
2549
|
* @param {Boolean} params.enableAdjustRes - 是否允许动态调整分辨率,默认值:关闭。
|