trtc-electron-sdk 12.7.706-beta.0 → 12.7.706-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.
|
@@ -15,6 +15,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
exports.TRTCMediaMixingManager = exports.TRTCMediaMixingEvent = void 0;
|
|
16
16
|
const events_1 = require("events");
|
|
17
17
|
const trtc_define_1 = require("../../trtc_define");
|
|
18
|
+
const types_1 = require("./types");
|
|
18
19
|
const utils_1 = require("../../utils");
|
|
19
20
|
const constant_1 = require("../../constant");
|
|
20
21
|
const index_1 = __importDefault(require("../../MediaMixingDesigner/index"));
|
|
@@ -484,7 +485,10 @@ class TRTCMediaMixingManager {
|
|
|
484
485
|
logger_1.default.log(`${this.logPrefix}addMediaSource:`, mediaSource);
|
|
485
486
|
const index = this.findMediaSourceIndex(mediaSource);
|
|
486
487
|
if (index !== -1) {
|
|
487
|
-
|
|
488
|
+
return Promise.reject({
|
|
489
|
+
code: types_1.TRTCMediaMixingErrorCode.InvalidParams,
|
|
490
|
+
message: "Media source already existed"
|
|
491
|
+
});
|
|
488
492
|
}
|
|
489
493
|
const newMediaSource = (0, utils_1.safelyParse)(JSON.stringify(mediaSource));
|
|
490
494
|
if (newMediaSource.isSelected) {
|
|
@@ -517,7 +521,10 @@ class TRTCMediaMixingManager {
|
|
|
517
521
|
logger_1.default.log(`${this.logPrefix}removeMediaSource:`, mediaSource);
|
|
518
522
|
const index = this.findMediaSourceIndex(mediaSource);
|
|
519
523
|
if (index === -1) {
|
|
520
|
-
|
|
524
|
+
return Promise.reject({
|
|
525
|
+
code: types_1.TRTCMediaMixingErrorCode.NotFoundSource,
|
|
526
|
+
message: "Not existing media source to remove"
|
|
527
|
+
});
|
|
521
528
|
}
|
|
522
529
|
return new Promise((resolve, reject) => {
|
|
523
530
|
const key = `${promiseKeys.removeMediaSource}-${mediaSource.sourceType}-${mediaSource.sourceId}`;
|
|
@@ -536,7 +543,10 @@ class TRTCMediaMixingManager {
|
|
|
536
543
|
logger_1.default.log(`${this.logPrefix}updateMediaSource:`, mediaSource);
|
|
537
544
|
const index = this.findMediaSourceIndex(mediaSource);
|
|
538
545
|
if (index === -1) {
|
|
539
|
-
|
|
546
|
+
return Promise.reject({
|
|
547
|
+
code: types_1.TRTCMediaMixingErrorCode.NotFoundSource,
|
|
548
|
+
message: "Not existing media source to update"
|
|
549
|
+
});
|
|
540
550
|
}
|
|
541
551
|
const newMediaSource = Object.assign(Object.assign({}, this.sourceList[index]), (0, utils_1.safelyParse)(JSON.stringify(mediaSource)));
|
|
542
552
|
if (mediaSource.isSelected) {
|
|
@@ -826,6 +836,10 @@ class TRTCMediaMixingManager {
|
|
|
826
836
|
});
|
|
827
837
|
});
|
|
828
838
|
}
|
|
839
|
+
callExperimentalAPI(jsonStr) {
|
|
840
|
+
logger_1.default.debug(`${this.logPrefix}callExperimentalAPI:${jsonStr}`);
|
|
841
|
+
this.nodeMediaMixingPlugin.callExperimentalAPI(jsonStr);
|
|
842
|
+
}
|
|
829
843
|
/**
|
|
830
844
|
* 注册事件监听
|
|
831
845
|
*
|
package/liteav/trtc.d.ts
CHANGED
|
@@ -2027,7 +2027,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
2027
2027
|
* true // enable highlight
|
|
2028
2028
|
* );
|
|
2029
2029
|
*/
|
|
2030
|
-
selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean):
|
|
2030
|
+
selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean): void;
|
|
2031
2031
|
/**
|
|
2032
2032
|
* 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。
|
|
2033
2033
|
*
|
package/liteav/trtc.js
CHANGED
|
@@ -5240,6 +5240,9 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5240
5240
|
return process.platform == 'darwin';
|
|
5241
5241
|
}
|
|
5242
5242
|
_setRemoteVideoBuffer(userId, streamType) {
|
|
5243
|
+
if (TRTCCloud.isIPCMode) {
|
|
5244
|
+
return;
|
|
5245
|
+
}
|
|
5243
5246
|
const videoBufferInfo = new trtc_define_1.VideoBufferInfo({
|
|
5244
5247
|
userId: userId,
|
|
5245
5248
|
id: (0, util_1.generateUniqueId)(),
|