trtc-electron-sdk 13.4.802-beta.2 → 13.4.802-beta.4
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/MediaMixingDesigner/index.d.ts +1 -0
- package/liteav/MediaMixingDesigner/index.js +9 -1
- package/liteav/VideoRenderControl/LocalVideoRenderController.d.ts +1 -1
- package/liteav/VideoRenderControl/LocalVideoRenderController.js +6 -2
- package/liteav/extensions/MediaMixingManager/MediaMixingManager.d.ts +7 -0
- package/liteav/extensions/MediaMixingManager/MediaMixingManager.js +58 -8
- package/liteav/extensions/MediaMixingManager/types.d.ts +5 -1
- package/liteav/trtc.d.ts +66 -10
- package/liteav/trtc.js +107 -48
- package/liteav/types.d.ts +2 -2
- package/package.json +1 -1
|
@@ -272,12 +272,16 @@ class TRTCMediaMixingDesigner {
|
|
|
272
272
|
}
|
|
273
273
|
}
|
|
274
274
|
updateOverlay() {
|
|
275
|
+
var _a;
|
|
275
276
|
if (this.moveAndResizeOverlay) {
|
|
276
277
|
let left = this.absoluteWorkingArea.left + this.previewLeft;
|
|
277
278
|
let top = this.absoluteWorkingArea.top + this.previewTop;
|
|
278
279
|
let width = 0;
|
|
279
280
|
let height = 0;
|
|
280
|
-
if (
|
|
281
|
+
// Even if a locked media source is forced into "selected" state (e.g. via
|
|
282
|
+
// an external list panel selection), the move/resize overlay must stay
|
|
283
|
+
// hidden so it cannot be dragged or resized from the canvas.
|
|
284
|
+
if (this.selectedMediaIndex >= 0 && !((_a = this.mediaList[this.selectedMediaIndex]) === null || _a === void 0 ? void 0 : _a.isLocked)) {
|
|
281
285
|
this.moveAndResizeOverlay.style.display = 'block';
|
|
282
286
|
const selectedPreviewRect = {
|
|
283
287
|
left: this.mediaList[this.selectedMediaIndex].rect.left * this.previewScale,
|
|
@@ -415,6 +419,10 @@ class TRTCMediaMixingDesigner {
|
|
|
415
419
|
for (let i = 0; i < this.mediaList.length; i++) {
|
|
416
420
|
const item = this.mediaList[i];
|
|
417
421
|
if (item.rect &&
|
|
422
|
+
// Locked media sources are excluded from hit test, so a click on a
|
|
423
|
+
// locked source falls through to the next (lower zOrder) hit, and
|
|
424
|
+
// it can never be selected/dragged/resized via canvas interaction.
|
|
425
|
+
!item.isLocked &&
|
|
418
426
|
xInImage >= item.rect.left &&
|
|
419
427
|
xInImage <= item.rect.right &&
|
|
420
428
|
yInImage >= item.rect.top &&
|
|
@@ -17,7 +17,7 @@ declare class LocalVideoRenderController {
|
|
|
17
17
|
startLocalPreview(views: Array<HTMLElement> | HTMLElement | null): void;
|
|
18
18
|
stopLocalPreview(): void;
|
|
19
19
|
updateLocalView(views: Array<HTMLElement> | HTMLElement | null): void;
|
|
20
|
-
startScreenCapture(
|
|
20
|
+
startScreenCapture(views?: Array<HTMLElement> | HTMLElement | null): void;
|
|
21
21
|
stopScreenCapture(): void;
|
|
22
22
|
setCustomRenderCallback(hasCallback: boolean): void;
|
|
23
23
|
setExternalRenderEnabled(enabled: boolean): void;
|
|
@@ -53,10 +53,10 @@ class LocalVideoRenderController {
|
|
|
53
53
|
throw error;
|
|
54
54
|
}
|
|
55
55
|
}
|
|
56
|
-
startScreenCapture(
|
|
56
|
+
startScreenCapture(views = null) {
|
|
57
57
|
try {
|
|
58
58
|
this.isLocalSharingStarted = true;
|
|
59
|
-
this.hasLocalSharingView =
|
|
59
|
+
this.hasLocalSharingView = this.validateViews(views);
|
|
60
60
|
this.update();
|
|
61
61
|
}
|
|
62
62
|
catch (error) {
|
|
@@ -139,6 +139,10 @@ class LocalVideoRenderController {
|
|
|
139
139
|
if (this.isLocalSharingStarted && this.hasLocalSharingView) {
|
|
140
140
|
return type_1.LocalVideoRenderCallbackState.Listening;
|
|
141
141
|
}
|
|
142
|
+
// 屏幕共享已启动且有自定义渲染回调,需要监听回调
|
|
143
|
+
if (this.isLocalSharingStarted && this.hasCustomRenderCallback) {
|
|
144
|
+
return type_1.LocalVideoRenderCallbackState.Listening;
|
|
145
|
+
}
|
|
142
146
|
// 默认不监听回调
|
|
143
147
|
return type_1.LocalVideoRenderCallbackState.NotListening;
|
|
144
148
|
}
|
|
@@ -278,6 +278,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
278
278
|
* 设置摄像头采集参数
|
|
279
279
|
*
|
|
280
280
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
281
|
+
* @private
|
|
281
282
|
*
|
|
282
283
|
* @param cameraID {string} - 摄像头 ID
|
|
283
284
|
* @param params {TRTCCameraCaptureParams} - 摄像头采集参数
|
|
@@ -296,6 +297,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
296
297
|
* 设置屏幕采集参数
|
|
297
298
|
*
|
|
298
299
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
300
|
+
* @private
|
|
299
301
|
*
|
|
300
302
|
* @param screenOrWindowID {String} - 屏幕 ID 或 窗口 ID
|
|
301
303
|
* @param property {TRTCScreenCaptureProperty} - 屏幕采集属性
|
|
@@ -305,6 +307,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
305
307
|
* 设置在线视频源播放参数
|
|
306
308
|
*
|
|
307
309
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
310
|
+
* @private
|
|
308
311
|
*
|
|
309
312
|
* @param url {string} - 在线视频源 URL
|
|
310
313
|
* @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
|
|
@@ -314,6 +317,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
314
317
|
* 设置视频文件播放参数
|
|
315
318
|
*
|
|
316
319
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
320
|
+
* @private
|
|
317
321
|
*
|
|
318
322
|
* @param videoFilePath {string} - 视频文件路径
|
|
319
323
|
* @param param {TRTCVideoFileParam} - 视频文件播放参数
|
|
@@ -335,6 +339,7 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
335
339
|
* @returns {Promise<void>}
|
|
336
340
|
*/
|
|
337
341
|
updatePublishParams(params: TRTCMediaMixingEncParam): Promise<void>;
|
|
342
|
+
private updatePublishParamsWithExperimentalAPI;
|
|
338
343
|
/**
|
|
339
344
|
* 设置连麦视频流布局
|
|
340
345
|
*
|
|
@@ -535,6 +540,8 @@ export declare class TRTCMediaMixingManager implements ITRTCMediaMixingManager {
|
|
|
535
540
|
* setter call.
|
|
536
541
|
*/
|
|
537
542
|
private _isSameCaptureParams;
|
|
543
|
+
private _omitIsPaused;
|
|
544
|
+
private _setVideoFilePaused;
|
|
538
545
|
private previewInNativeWindow;
|
|
539
546
|
private previewInWebElement;
|
|
540
547
|
private previewInNone;
|
|
@@ -8,12 +8,24 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
8
8
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
9
|
});
|
|
10
10
|
};
|
|
11
|
+
var __rest = (this && this.__rest) || function (s, e) {
|
|
12
|
+
var t = {};
|
|
13
|
+
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
14
|
+
t[p] = s[p];
|
|
15
|
+
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
16
|
+
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
17
|
+
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
18
|
+
t[p[i]] = s[p[i]];
|
|
19
|
+
}
|
|
20
|
+
return t;
|
|
21
|
+
};
|
|
11
22
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
12
23
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
13
24
|
};
|
|
14
25
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
15
26
|
exports.TRTCMediaMixingManager = exports.TRTCMediaMixingEvent = void 0;
|
|
16
27
|
const events_1 = require("events");
|
|
28
|
+
const lodash_isequal_1 = __importDefault(require("lodash.isequal"));
|
|
17
29
|
const trtc_define_1 = require("../../trtc_define");
|
|
18
30
|
const types_1 = require("./types");
|
|
19
31
|
const utils_1 = require("../../utils");
|
|
@@ -644,6 +656,7 @@ class TRTCMediaMixingManager {
|
|
|
644
656
|
id: `${newMediaSource.sourceType}__${newMediaSource.sourceId}`,
|
|
645
657
|
rect: newMediaSource.rect,
|
|
646
658
|
isSelected: newMediaSource.isSelected || false,
|
|
659
|
+
isLocked: newMediaSource.isLocked || false,
|
|
647
660
|
zOrder: newMediaSource.zOrder,
|
|
648
661
|
origin: newMediaSource
|
|
649
662
|
});
|
|
@@ -657,6 +670,8 @@ class TRTCMediaMixingManager {
|
|
|
657
670
|
return 11000;
|
|
658
671
|
case types_1.TRTCMediaSourceType.kVideoFile:
|
|
659
672
|
return 6000;
|
|
673
|
+
case types_1.TRTCMediaSourceType.kCamera:
|
|
674
|
+
return 8000; // camera maybe very slow
|
|
660
675
|
default:
|
|
661
676
|
return 5000;
|
|
662
677
|
}
|
|
@@ -706,6 +721,7 @@ class TRTCMediaMixingManager {
|
|
|
706
721
|
id: `${mediaSource.sourceType}__${mediaSource.sourceId}`,
|
|
707
722
|
rect: mediaSource.rect,
|
|
708
723
|
isSelected: mediaSource.isSelected || false,
|
|
724
|
+
isLocked: mediaSource.isLocked || false,
|
|
709
725
|
zOrder: mediaSource.zOrder,
|
|
710
726
|
origin: (0, utils_1.safelyParse)(JSON.stringify(mediaSource))
|
|
711
727
|
});
|
|
@@ -740,6 +756,7 @@ class TRTCMediaMixingManager {
|
|
|
740
756
|
id: `${mediaSource.sourceType}__${mediaSource.sourceId}`,
|
|
741
757
|
rect: mediaSource.rect,
|
|
742
758
|
isSelected: mediaSource.isSelected || false,
|
|
759
|
+
isLocked: mediaSource.isLocked || false,
|
|
743
760
|
zOrder: mediaSource.zOrder,
|
|
744
761
|
origin: (0, utils_1.safelyParse)(JSON.stringify(mediaSource))
|
|
745
762
|
});
|
|
@@ -750,6 +767,7 @@ class TRTCMediaMixingManager {
|
|
|
750
767
|
* 设置摄像头采集参数
|
|
751
768
|
*
|
|
752
769
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
770
|
+
* @private
|
|
753
771
|
*
|
|
754
772
|
* @param cameraID {string} - 摄像头 ID
|
|
755
773
|
* @param params {TRTCCameraCaptureParams} - 摄像头采集参数
|
|
@@ -782,6 +800,7 @@ class TRTCMediaMixingManager {
|
|
|
782
800
|
* 设置屏幕采集参数
|
|
783
801
|
*
|
|
784
802
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
803
|
+
* @private
|
|
785
804
|
*
|
|
786
805
|
* @param screenOrWindowID {String} - 屏幕 ID 或 窗口 ID
|
|
787
806
|
* @param property {TRTCScreenCaptureProperty} - 屏幕采集属性
|
|
@@ -793,6 +812,7 @@ class TRTCMediaMixingManager {
|
|
|
793
812
|
* 设置在线视频源播放参数
|
|
794
813
|
*
|
|
795
814
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
815
|
+
* @private
|
|
796
816
|
*
|
|
797
817
|
* @param url {string} - 在线视频源 URL
|
|
798
818
|
* @param param {TRTCOnlineVideoParam} - 在线视频源播放参数
|
|
@@ -804,6 +824,7 @@ class TRTCMediaMixingManager {
|
|
|
804
824
|
* 设置视频文件播放参数
|
|
805
825
|
*
|
|
806
826
|
* @deprecated 请使用 `addMediaSource` 或 `updateMediaSource` 代替
|
|
827
|
+
* @private
|
|
807
828
|
*
|
|
808
829
|
* @param videoFilePath {string} - 视频文件路径
|
|
809
830
|
* @param param {TRTCVideoFileParam} - 视频文件播放参数
|
|
@@ -851,6 +872,11 @@ class TRTCMediaMixingManager {
|
|
|
851
872
|
width: this.mixingVideoWidth,
|
|
852
873
|
height: this.mixingVideoHeight
|
|
853
874
|
});
|
|
875
|
+
return this.updatePublishParamsWithExperimentalAPI(params);
|
|
876
|
+
});
|
|
877
|
+
}
|
|
878
|
+
updatePublishParamsWithExperimentalAPI(params) {
|
|
879
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
854
880
|
const result = yield this.nodeMediaMixingPlugin.updatePublishParams(Object.assign(Object.assign({}, params), { videoEncoderParams: {
|
|
855
881
|
videoResolution: 0,
|
|
856
882
|
resMode: 0,
|
|
@@ -1159,6 +1185,7 @@ class TRTCMediaMixingManager {
|
|
|
1159
1185
|
id: `${mediaSource.sourceType}__${mediaSource.sourceId}`,
|
|
1160
1186
|
rect: mediaSource.rect,
|
|
1161
1187
|
isSelected: mediaSource.isSelected || false,
|
|
1188
|
+
isLocked: mediaSource.isLocked || false,
|
|
1162
1189
|
zOrder: mediaSource.zOrder,
|
|
1163
1190
|
origin: mediaSource
|
|
1164
1191
|
});
|
|
@@ -1299,6 +1326,7 @@ class TRTCMediaMixingManager {
|
|
|
1299
1326
|
id: `${this.sourceList[index].sourceType}__${this.sourceList[index].sourceId}`,
|
|
1300
1327
|
rect: this.sourceList[index].rect,
|
|
1301
1328
|
isSelected: this.sourceList[index].isSelected || false,
|
|
1329
|
+
isLocked: this.sourceList[index].isLocked || false,
|
|
1302
1330
|
zOrder: this.sourceList[index].zOrder,
|
|
1303
1331
|
origin: (0, utils_1.safelyParse)(JSON.stringify(this.sourceList[index]))
|
|
1304
1332
|
});
|
|
@@ -1526,7 +1554,7 @@ class TRTCMediaMixingManager {
|
|
|
1526
1554
|
yield this.startMediaMixingServer('', recoverMode);
|
|
1527
1555
|
yield this.bindPreviewArea(this.windowID, this.view);
|
|
1528
1556
|
yield this.startPublish();
|
|
1529
|
-
yield this.
|
|
1557
|
+
yield this.updatePublishParamsWithExperimentalAPI(this.publishParams);
|
|
1530
1558
|
// 混流服务崩溃重启后,底层 NodeRemoteVideoPluginManager 为全新初始状态,
|
|
1531
1559
|
// 需要重放之前通过 setPluginParams 设置的插件参数。
|
|
1532
1560
|
const pluginManager = this.pluginManager;
|
|
@@ -1620,6 +1648,7 @@ class TRTCMediaMixingManager {
|
|
|
1620
1648
|
* setter is always invoked when params are present).
|
|
1621
1649
|
*/
|
|
1622
1650
|
_applyMediaSourceParams(mediaSource, oldMediaSource) {
|
|
1651
|
+
var _a;
|
|
1623
1652
|
switch (mediaSource.sourceType) {
|
|
1624
1653
|
case types_1.TRTCMediaSourceType.kCamera:
|
|
1625
1654
|
// Skip kCamera on the add path to avoid an extra camera restart;
|
|
@@ -1639,10 +1668,22 @@ class TRTCMediaMixingManager {
|
|
|
1639
1668
|
}
|
|
1640
1669
|
break;
|
|
1641
1670
|
case types_1.TRTCMediaSourceType.kVideoFile:
|
|
1642
|
-
if (mediaSource.localVideo
|
|
1643
|
-
this.
|
|
1671
|
+
if (mediaSource.localVideo) {
|
|
1672
|
+
const nextParam = this._omitIsPaused(mediaSource.localVideo);
|
|
1673
|
+
const prevParam = this._omitIsPaused(oldMediaSource === null || oldMediaSource === void 0 ? void 0 : oldMediaSource.localVideo);
|
|
1674
|
+
if (!this._isSameCaptureParams(nextParam, prevParam)) {
|
|
1675
|
+
this.setVideoFileParam(mediaSource.sourceId, mediaSource.localVideo);
|
|
1676
|
+
}
|
|
1677
|
+
const nextIsPaused = !!mediaSource.localVideo.isPaused;
|
|
1678
|
+
const prevIsPaused = !!((_a = oldMediaSource === null || oldMediaSource === void 0 ? void 0 : oldMediaSource.localVideo) === null || _a === void 0 ? void 0 : _a.isPaused);
|
|
1679
|
+
if (nextIsPaused !== prevIsPaused) {
|
|
1680
|
+
this._setVideoFilePaused(mediaSource.sourceId, nextIsPaused);
|
|
1681
|
+
}
|
|
1644
1682
|
}
|
|
1645
1683
|
break;
|
|
1684
|
+
default:
|
|
1685
|
+
logger_1.default.warn(`[TRTC] Unknown media source type: ${mediaSource.sourceType}`);
|
|
1686
|
+
break;
|
|
1646
1687
|
}
|
|
1647
1688
|
}
|
|
1648
1689
|
/**
|
|
@@ -1674,12 +1715,21 @@ class TRTCMediaMixingManager {
|
|
|
1674
1715
|
if (nextEmpty || prevEmpty) {
|
|
1675
1716
|
return false;
|
|
1676
1717
|
}
|
|
1677
|
-
|
|
1678
|
-
|
|
1718
|
+
return (0, lodash_isequal_1.default)(next, prev);
|
|
1719
|
+
}
|
|
1720
|
+
_omitIsPaused(param) {
|
|
1721
|
+
if (!param) {
|
|
1722
|
+
return undefined;
|
|
1679
1723
|
}
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1724
|
+
const { isPaused } = param, rest = __rest(param, ["isPaused"]);
|
|
1725
|
+
return rest;
|
|
1726
|
+
}
|
|
1727
|
+
_setVideoFilePaused(sourceId, isPaused) {
|
|
1728
|
+
if (isPaused) {
|
|
1729
|
+
this.nodeMediaMixingPlugin.pauseVideoFileSource(sourceId);
|
|
1730
|
+
}
|
|
1731
|
+
else {
|
|
1732
|
+
this.nodeMediaMixingPlugin.resumeVideoFileSource(sourceId);
|
|
1683
1733
|
}
|
|
1684
1734
|
}
|
|
1685
1735
|
previewInNativeWindow(viewOrRegion) {
|
|
@@ -46,6 +46,9 @@ export declare type TRTCOnlineVideoParam = {
|
|
|
46
46
|
export declare type TRTCVideoFileParam = {
|
|
47
47
|
playoutVolume: number;
|
|
48
48
|
};
|
|
49
|
+
export declare type TRTCMediaMixingLocalVideoParam = TRTCVideoFileParam & {
|
|
50
|
+
isPaused?: boolean;
|
|
51
|
+
};
|
|
49
52
|
export declare type TRTCMediaSource = {
|
|
50
53
|
sourceType: TRTCMediaSourceType;
|
|
51
54
|
sourceId: string;
|
|
@@ -53,12 +56,13 @@ export declare type TRTCMediaSource = {
|
|
|
53
56
|
enableGreenScreen?: boolean;
|
|
54
57
|
rect: Rect;
|
|
55
58
|
isSelected?: boolean;
|
|
59
|
+
isLocked?: boolean;
|
|
56
60
|
rotation?: TRTCVideoRotation;
|
|
57
61
|
fillMode?: TRTCVideoFillMode;
|
|
58
62
|
mirrorType?: TRTCVideoMirrorType;
|
|
59
63
|
camera?: TRTCCameraCaptureParams;
|
|
60
64
|
screen?: TRTCScreenCaptureProperty;
|
|
61
|
-
localVideo?:
|
|
65
|
+
localVideo?: TRTCMediaMixingLocalVideoParam;
|
|
62
66
|
onlineVideo?: TRTCOnlineVideoParam;
|
|
63
67
|
};
|
|
64
68
|
export declare type TRTCMediaMixingEncParam = {
|
package/liteav/trtc.d.ts
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
3
|
import { TRTCConfig } from './Renderer/util';
|
|
4
4
|
import TRTCLocalMediaTranscoder from './LocalMediaTranscoder';
|
|
5
|
-
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCAudioFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, TRTCPluginType, TRTCPluginInfo, TRTCVideoProcessPluginOptions, TRTCMediaEncryptDecryptPluginOptions, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer, TRTCInitConfig, TRTCAudioParallelParams, TRTCVoiceReverbType, TRTCVoiceChangerType, TRTCMusicPlayObserver, TRTCAudioFrameCallback, TRTCAudioProcessPluginOptions, TRTCPublishTarget, TRTCStreamEncoderParam, TRTCStreamMixingConfig } from './trtc_define';
|
|
5
|
+
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoEncParam, TRTCVideoFillMode, TRTCAudioFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, TRTCPluginType, TRTCPluginInfo, TRTCVideoProcessPluginOptions, TRTCMediaEncryptDecryptPluginOptions, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer, TRTCInitConfig, TRTCAudioParallelParams, TRTCVoiceReverbType, TRTCVoiceChangerType, TRTCMusicPlayObserver, TRTCAudioFrameCallback, TRTCAudioProcessPluginOptions, TRTCPublishTarget, TRTCStreamEncoderParam, TRTCStreamMixingConfig } from './trtc_define';
|
|
6
6
|
import { ITRTCCloud, TRTCVideoRenderCallback } from './types';
|
|
7
7
|
import TRTCMediaMixingManager, { TRTCMediaMixingService } from './extensions/MediaMixingManager';
|
|
8
8
|
/**
|
|
@@ -112,6 +112,10 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
112
112
|
*/
|
|
113
113
|
static destroyTRTCShareInstance(): void;
|
|
114
114
|
private onFPSChanged;
|
|
115
|
+
/**
|
|
116
|
+
* 销毁当前实例,释放资源
|
|
117
|
+
*/
|
|
118
|
+
destroy(): void;
|
|
115
119
|
/**
|
|
116
120
|
* 创建子实例
|
|
117
121
|
*
|
|
@@ -130,6 +134,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
130
134
|
*/
|
|
131
135
|
createSubCloud(config?: TRTCInitConfig): TRTCCloud | null;
|
|
132
136
|
/**
|
|
137
|
+
* @private
|
|
133
138
|
* 获取 TRTC 配置对象
|
|
134
139
|
*
|
|
135
140
|
* 可以通过 TRTC 配置对象 {@link TRTCConfig} 打开 debug 模式
|
|
@@ -144,17 +149,15 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
144
149
|
*/
|
|
145
150
|
getConfigObject(): TRTCConfig;
|
|
146
151
|
/**
|
|
152
|
+
* @private
|
|
147
153
|
* @deprecated
|
|
148
154
|
*/
|
|
149
155
|
setExternalRenderEnabled(enabled: boolean): void;
|
|
150
156
|
/**
|
|
157
|
+
* @private
|
|
151
158
|
* @deprecated
|
|
152
159
|
*/
|
|
153
160
|
setCaptureLocalVideoEnabled(enabled: boolean): void;
|
|
154
|
-
/**
|
|
155
|
-
* 销毁当前实例,释放资源
|
|
156
|
-
*/
|
|
157
|
-
destroy(): void;
|
|
158
161
|
/**
|
|
159
162
|
* 设置 TRTCCloud 回调
|
|
160
163
|
*
|
|
@@ -1154,11 +1157,13 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1154
1157
|
* @param {String} streamId - 自定义流 ID。
|
|
1155
1158
|
* @param {TRTCVideoStreamType} type - 仅支持 TRTCVideoStreamTypeBig 和 TRTCVideoStreamTypeSub。
|
|
1156
1159
|
* @deprecated
|
|
1160
|
+
* @private
|
|
1157
1161
|
*/
|
|
1158
1162
|
startPublishing(streamId: string, type: TRTCVideoStreamType): void;
|
|
1159
1163
|
/**
|
|
1160
1164
|
* 停止向腾讯云的直播 CDN 推流
|
|
1161
1165
|
* @deprecated
|
|
1166
|
+
* @private
|
|
1162
1167
|
*/
|
|
1163
1168
|
stopPublishing(): void;
|
|
1164
1169
|
/**
|
|
@@ -1175,11 +1180,13 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1175
1180
|
* @param {String} param.url - 指定该路音视频流在第三方直播服务商的推流地址,推流 URL 必须为 RTMP 格式,必须符合您的目标直播服务商的规范要求,否则目标服务商会拒绝来自 TRTC 后台服务的推流请求。
|
|
1176
1181
|
* @param {String} param.streamId - 需要转推的 streamId,默认值:空值。如果不填写,则默认转推调用者的旁路流。
|
|
1177
1182
|
* @deprecated
|
|
1183
|
+
* @private
|
|
1178
1184
|
*/
|
|
1179
1185
|
startPublishCDNStream(param: any): void;
|
|
1180
1186
|
/**
|
|
1181
1187
|
* 停止向非腾讯云的直播 CDN 推流
|
|
1182
1188
|
* @deprecated
|
|
1189
|
+
* @private
|
|
1183
1190
|
*/
|
|
1184
1191
|
stopPublishCDNStream(): void;
|
|
1185
1192
|
/**
|
|
@@ -1249,6 +1256,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1249
1256
|
* @param {Number} config.mixUsersArray[].soundLevel - 该路音频参与混音时的音量等级(取值范围:0 - 100),默认值:100。
|
|
1250
1257
|
* @param {String} config.mixUsersArray[].image - 占位图是指当对应 userId 混流内容为纯音频时,混合后的画面中显示的是占位图片。水印图是指一张贴在混合后画面中的半透明图片,这张图片会一直覆盖于混合后的画面上。当指定 inputType 为 TRTCMixInputTypePureAudio 时,image 为占位图,此时需要您指定 userId。当指定 inputType 为 TRTCMixInputTypeWatermark 时,image 为水印图,此时不需要您指定 userId。
|
|
1251
1258
|
* @deprecated
|
|
1259
|
+
* @private
|
|
1252
1260
|
*/
|
|
1253
1261
|
setMixTranscodingConfig(config: Record<string, any>): void;
|
|
1254
1262
|
private _startLocalPreview;
|
|
@@ -1333,6 +1341,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1333
1341
|
stopRemoteView(userId: string, streamType?: TRTCVideoStreamType): void;
|
|
1334
1342
|
/**
|
|
1335
1343
|
* 修改远端视频渲染的 HTML 元素
|
|
1344
|
+
*
|
|
1336
1345
|
* 本接口用于切换显示区域的交互场景中,修改远端视频渲染的 HTML 元素。
|
|
1337
1346
|
*
|
|
1338
1347
|
* 注意:必须调用 [startRemoteView()]{@link TRTCCloud#startRemoteView} 订阅了远端视频流之后,调用此接口才会生效。
|
|
@@ -1406,6 +1415,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1406
1415
|
*/
|
|
1407
1416
|
setLocalRenderParams(params: TRTCRenderParams): void;
|
|
1408
1417
|
/**
|
|
1418
|
+
* @private
|
|
1409
1419
|
* 废弃接口: 设置本地图像的渲染模式
|
|
1410
1420
|
*
|
|
1411
1421
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -1426,6 +1436,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1426
1436
|
*/
|
|
1427
1437
|
setRemoteRenderParams(userId: string, streamType: TRTCVideoStreamType, params: TRTCRenderParams): void;
|
|
1428
1438
|
/**
|
|
1439
|
+
* @private
|
|
1429
1440
|
* 废弃接口: 设置远端图像的渲染模式
|
|
1430
1441
|
*
|
|
1431
1442
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setRemoteRenderParams 接口替代。
|
|
@@ -1436,6 +1447,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1436
1447
|
*/
|
|
1437
1448
|
setRemoteViewFillMode(userId: string, mode: TRTCVideoFillMode): void;
|
|
1438
1449
|
/**
|
|
1450
|
+
* @private
|
|
1439
1451
|
* 废弃接口: 设置本地图像的顺时针旋转角度
|
|
1440
1452
|
*
|
|
1441
1453
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -1447,6 +1459,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1447
1459
|
*/
|
|
1448
1460
|
setLocalViewRotation(rotation: TRTCVideoRotation): void;
|
|
1449
1461
|
/**
|
|
1462
|
+
* @private
|
|
1450
1463
|
* 废弃接口: 设置远端图像的顺时针旋转角度
|
|
1451
1464
|
*
|
|
1452
1465
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setRemoteRenderParams 接口替代。
|
|
@@ -1467,6 +1480,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1467
1480
|
*/
|
|
1468
1481
|
setVideoEncoderRotation(rotation: TRTCVideoRotation): void;
|
|
1469
1482
|
/**
|
|
1483
|
+
* @private
|
|
1470
1484
|
* 废弃接口: 设置本地摄像头预览画面的镜像模式
|
|
1471
1485
|
*
|
|
1472
1486
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -1527,6 +1541,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1527
1541
|
*/
|
|
1528
1542
|
snapshotVideo(userId: string, type: TRTCVideoStreamType): void;
|
|
1529
1543
|
/**
|
|
1544
|
+
* @private
|
|
1530
1545
|
* 废弃接口: 设定观看方优先选择的视频质量
|
|
1531
1546
|
*
|
|
1532
1547
|
* 低端设备推荐优先选择低清晰度的小画面。
|
|
@@ -1742,6 +1757,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1742
1757
|
*/
|
|
1743
1758
|
setAudioQuality(quality: TRTCAudioQuality): void;
|
|
1744
1759
|
/**
|
|
1760
|
+
* @private
|
|
1745
1761
|
* 废弃接口:设置麦克风的音量大小
|
|
1746
1762
|
*
|
|
1747
1763
|
* @deprecated 从 TRTCSDK6.9 后该接口已被废弃,请使用 setAudioCaptureVolume 接口替代。
|
|
@@ -1923,6 +1939,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1923
1939
|
*/
|
|
1924
1940
|
setWaterMark(streamType: TRTCVideoStreamType, srcData: ArrayBuffer | string | null, srcType: TRTCWaterMarkSrcType, nWidth: number, nHeight: number, xOffset: number, yOffset: number, fWidthRatio: number): void;
|
|
1925
1941
|
/**
|
|
1942
|
+
* @private
|
|
1926
1943
|
* 废弃接口: 开始显示远端用户的辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)
|
|
1927
1944
|
*
|
|
1928
1945
|
* - startRemoteView() 用于显示主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)。
|
|
@@ -1937,6 +1954,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1937
1954
|
*/
|
|
1938
1955
|
startRemoteSubStreamView(userId: string, view: HTMLElement): void;
|
|
1939
1956
|
/**
|
|
1957
|
+
* @private
|
|
1940
1958
|
* 废弃接口: 停止显示远端用户的辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)。
|
|
1941
1959
|
*
|
|
1942
1960
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopRemoteView 接口替代。
|
|
@@ -1945,6 +1963,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1945
1963
|
*/
|
|
1946
1964
|
stopRemoteSubStreamView(userId: string): void;
|
|
1947
1965
|
/**
|
|
1966
|
+
* @private
|
|
1948
1967
|
* 废弃接口: 设置辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)的显示模式。
|
|
1949
1968
|
*
|
|
1950
1969
|
* - setRemoteViewFillMode() 用于设置远端主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)的显示模式。
|
|
@@ -1959,6 +1978,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
1959
1978
|
*/
|
|
1960
1979
|
setRemoteSubStreamViewFillMode(userId: string, mode: TRTCVideoFillMode): void;
|
|
1961
1980
|
/**
|
|
1981
|
+
* @private
|
|
1962
1982
|
* 废弃接口: 设置辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)的顺时针旋转角度
|
|
1963
1983
|
*
|
|
1964
1984
|
* - setRemoteViewRotation() 用于设置远端主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)的旋转角度。
|
|
@@ -2067,7 +2087,10 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2067
2087
|
* 一个用户同时最多只能上传一条主路(TRTCVideoStreamTypeBig)画面和一条辅路(TRTCVideoStreamTypeSub)画面,
|
|
2068
2088
|
* 默认情况下,屏幕分享使用辅路画面,如果使用主路画面,建议您提前停止摄像头采集(stopLocalPreview)避免相互冲突。
|
|
2069
2089
|
*
|
|
2070
|
-
* @param {HTMLElement}
|
|
2090
|
+
* @param {Array<HTMLElement>|HTMLElement|null} views - 承载预览画面的单个 HTML 块节点或者 HTML 块节点数组
|
|
2091
|
+
* - 传入单个 HTML 块节点:在该节点上预览屏幕分享画面。
|
|
2092
|
+
* - 传入 HTML 块节点数组:在多个节点上同时预览同一路屏幕分享画面(多路预览),适用于双屏/多窗口场景。
|
|
2093
|
+
* - 传入 `null`:不预览屏幕分享画面,但不影响屏幕分享的采集与上行;此时若设置了 [setLocalVideoRenderCallback()]{@link TRTCCloud#setLocalVideoRenderCallback} 自定义渲染回调,可通过回调获取屏幕分享的视频帧自行渲染。
|
|
2071
2094
|
* @param {TRTCVideoStreamType} type 屏幕分享使用的线路,可以设置为主路(TRTCVideoStreamTypeBig)或者辅路(TRTCVideoStreamTypeSub),默认使用辅路。
|
|
2072
2095
|
* @param {TRTCVideoEncParam} params 屏幕分享的画面编码参数,可以设置为 null,表示让 SDK 选择最佳的编码参数(分辨率、码率等)。即使在调用 startScreenCapture 时设置 type=TRTCVideoStreamTypeBig,依然可以使用此接口更新屏幕分享的编码参数。
|
|
2073
2096
|
*
|
|
@@ -2113,12 +2136,20 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2113
2136
|
* );
|
|
2114
2137
|
*
|
|
2115
2138
|
* rtcCloud.startScreenCapture(
|
|
2116
|
-
* view, // HTML Element
|
|
2139
|
+
* view, // 单个 HTML Element
|
|
2140
|
+
* TRTCVideoStreamType.TRTCVideoStreamTypeSub,
|
|
2141
|
+
* screenShareEncParam,
|
|
2142
|
+
* );
|
|
2143
|
+
*
|
|
2144
|
+
* @example
|
|
2145
|
+
* // 屏幕分享多路预览:同一路屏幕分享画面同时渲染到多个 HTML 元素上
|
|
2146
|
+
* rtcCloud.startScreenCapture(
|
|
2147
|
+
* [viewOnCurrentScreen, viewOnExtendedScreen], // HTML Element 数组
|
|
2117
2148
|
* TRTCVideoStreamType.TRTCVideoStreamTypeSub,
|
|
2118
2149
|
* screenShareEncParam,
|
|
2119
2150
|
* );
|
|
2120
2151
|
*/
|
|
2121
|
-
startScreenCapture(
|
|
2152
|
+
startScreenCapture(views?: Array<HTMLElement> | HTMLElement | null, type?: TRTCVideoStreamType, params?: TRTCVideoEncParam | undefined | null): void;
|
|
2122
2153
|
/**
|
|
2123
2154
|
* 暂停屏幕分享
|
|
2124
2155
|
*/
|
|
@@ -2355,7 +2386,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2355
2386
|
* import TRTCCloud from 'trtc-electron-sdk';
|
|
2356
2387
|
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
2357
2388
|
* trtc.setLocalVideoRenderCallback(TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
2358
|
-
* onRenderVideoFrame(userId, streamType, frame) {
|
|
2389
|
+
* onRenderVideoFrame: function(userId, streamType, frame) {
|
|
2359
2390
|
* // 处理本地视频帧的回调
|
|
2360
2391
|
* }
|
|
2361
2392
|
* });
|
|
@@ -2380,7 +2411,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2380
2411
|
* import TRTCCloud from 'trtc-electron-sdk';
|
|
2381
2412
|
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
2382
2413
|
* trtc.setRemoteVideoRenderCallback('remoteUserId', TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
2383
|
-
* onRenderVideoFrame(userId, streamType, frame) {
|
|
2414
|
+
* onRenderVideoFrame: function(userId, streamType, frame) {
|
|
2384
2415
|
* // 处理远端视频帧的回调
|
|
2385
2416
|
* }
|
|
2386
2417
|
* });
|
|
@@ -2430,6 +2461,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2430
2461
|
*/
|
|
2431
2462
|
sendSEIMsg(msg: ArrayBuffer | ArrayBufferView, repeatCount: number): boolean;
|
|
2432
2463
|
/**
|
|
2464
|
+
* @private
|
|
2433
2465
|
* 废弃接口: 启动播放背景音乐
|
|
2434
2466
|
*
|
|
2435
2467
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 startPlayMusic 接口替代。
|
|
@@ -2438,6 +2470,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2438
2470
|
*/
|
|
2439
2471
|
playBGM(path: string): void;
|
|
2440
2472
|
/**
|
|
2473
|
+
* @private
|
|
2441
2474
|
* 废弃接口: 停止播放背景音乐
|
|
2442
2475
|
*
|
|
2443
2476
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopPlayMusic 接口替代。
|
|
@@ -2445,6 +2478,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2445
2478
|
*/
|
|
2446
2479
|
stopBGM(): void;
|
|
2447
2480
|
/**
|
|
2481
|
+
* @private
|
|
2448
2482
|
* 废弃接口: 暂停播放背景音乐
|
|
2449
2483
|
*
|
|
2450
2484
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 pausePlayMusic 接口替代。
|
|
@@ -2452,6 +2486,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2452
2486
|
*/
|
|
2453
2487
|
pauseBGM(): void;
|
|
2454
2488
|
/**
|
|
2489
|
+
* @private
|
|
2455
2490
|
* 废弃接口: 继续播放背景音乐
|
|
2456
2491
|
*
|
|
2457
2492
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 resumePlayMusic 接口替代。
|
|
@@ -2459,6 +2494,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2459
2494
|
*/
|
|
2460
2495
|
resumeBGM(): void;
|
|
2461
2496
|
/**
|
|
2497
|
+
* @private
|
|
2462
2498
|
* 废弃接口: 获取背景音乐文件总时长,单位毫秒
|
|
2463
2499
|
*
|
|
2464
2500
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 getMusicDurationInMS 接口替代。
|
|
@@ -2468,6 +2504,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2468
2504
|
*/
|
|
2469
2505
|
getBGMDuration(path: string): number;
|
|
2470
2506
|
/**
|
|
2507
|
+
* @private
|
|
2471
2508
|
* 废弃接口: 设置背景音乐播放进度
|
|
2472
2509
|
*
|
|
2473
2510
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 seekMusicToPosInTime 接口替代。
|
|
@@ -2476,6 +2513,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2476
2513
|
*/
|
|
2477
2514
|
setBGMPosition(pos: number): void;
|
|
2478
2515
|
/**
|
|
2516
|
+
* @private
|
|
2479
2517
|
* 废弃接口: 设置背景音乐的音量大小,播放背景音乐混音时使用,用来控制背景音音量大小
|
|
2480
2518
|
*
|
|
2481
2519
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setAllMusicVolume 接口替代。
|
|
@@ -2484,6 +2522,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2484
2522
|
*/
|
|
2485
2523
|
setBGMVolume(volume: number): void;
|
|
2486
2524
|
/**
|
|
2525
|
+
* @private
|
|
2487
2526
|
* 废弃接口: 设置背景音乐本地播放音量的大小
|
|
2488
2527
|
*
|
|
2489
2528
|
* 播放背景音乐混音时使用,用来控制背景音乐在本地播放时的音量大小。
|
|
@@ -2494,6 +2533,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2494
2533
|
*/
|
|
2495
2534
|
setBGMPlayoutVolume(volume: number): void;
|
|
2496
2535
|
/**
|
|
2536
|
+
* @private
|
|
2497
2537
|
* 废弃接口: 设置背景音乐远端播放音量的大小
|
|
2498
2538
|
*
|
|
2499
2539
|
* 播放背景音乐混音时使用,用来控制背景音乐在远端播放时的音量大小。
|
|
@@ -2694,6 +2734,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2694
2734
|
*/
|
|
2695
2735
|
setVoiceChangerType(type: TRTCVoiceChangerType): void;
|
|
2696
2736
|
/**
|
|
2737
|
+
* @private
|
|
2697
2738
|
* 废弃接口: 播放音效
|
|
2698
2739
|
*
|
|
2699
2740
|
* 每个音效都需要您指定具体的 ID,您可以通过该 ID 对音效的开始、停止、音量等进行设置。
|
|
@@ -2706,6 +2747,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2706
2747
|
*/
|
|
2707
2748
|
playAudioEffect(effect: TRTCAudioEffectParam): void;
|
|
2708
2749
|
/**
|
|
2750
|
+
* @private
|
|
2709
2751
|
* 废弃接口: 设置音效音量
|
|
2710
2752
|
*
|
|
2711
2753
|
* 注意:会覆盖通过 setAllAudioEffectsVolume 指定的整体音效音量。
|
|
@@ -2717,6 +2759,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2717
2759
|
*/
|
|
2718
2760
|
setAudioEffectVolume(effectId: number, volume: number): void;
|
|
2719
2761
|
/**
|
|
2762
|
+
* @private
|
|
2720
2763
|
* 废弃接口: 停止音效
|
|
2721
2764
|
*
|
|
2722
2765
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopPlayMusic 接口替代。
|
|
@@ -2725,6 +2768,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2725
2768
|
*/
|
|
2726
2769
|
stopAudioEffect(effectId: number): void;
|
|
2727
2770
|
/**
|
|
2771
|
+
* @private
|
|
2728
2772
|
* 废弃接口: 停止所有音效
|
|
2729
2773
|
*
|
|
2730
2774
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃
|
|
@@ -2732,6 +2776,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2732
2776
|
*/
|
|
2733
2777
|
stopAllAudioEffects(): void;
|
|
2734
2778
|
/**
|
|
2779
|
+
* @private
|
|
2735
2780
|
* 废弃接口: 设置所有音效的音量
|
|
2736
2781
|
*
|
|
2737
2782
|
* 注意:该操作会覆盖通过 setAudioEffectVolume 指定的单独音效音量。
|
|
@@ -2742,6 +2787,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2742
2787
|
*/
|
|
2743
2788
|
setAllAudioEffectsVolume(volume: number): void;
|
|
2744
2789
|
/**
|
|
2790
|
+
* @private
|
|
2745
2791
|
* 废弃接口: 暂停音效
|
|
2746
2792
|
*
|
|
2747
2793
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 pausePlayMusic 接口替代。
|
|
@@ -2750,6 +2796,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2750
2796
|
*/
|
|
2751
2797
|
pauseAudioEffect(effectId: number): void;
|
|
2752
2798
|
/**
|
|
2799
|
+
* @private
|
|
2753
2800
|
* 废弃接口: 恢复音效
|
|
2754
2801
|
*
|
|
2755
2802
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 resumePlayMusic 接口替代。
|
|
@@ -2893,6 +2940,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2893
2940
|
private addRemoteVideoRenderCallback;
|
|
2894
2941
|
private removeRemoteVideoRenderCallback;
|
|
2895
2942
|
/**
|
|
2943
|
+
* @private
|
|
2896
2944
|
* 废弃接口:选择绘制的模式 (webgl/yuvcanvs/)
|
|
2897
2945
|
*
|
|
2898
2946
|
* @deprecated 从 10.3.403 版本该接口被废弃。SDK 内部会根据视频流数据,自动选择合适的渲染方式,可能的渲染方式有 WebGL、Canvas 2D、video 标签。调用该接口不再修改视频的渲染方式。
|
|
@@ -2954,6 +3002,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2954
3002
|
*/
|
|
2955
3003
|
setPluginCallback(pluginCallback: (pluginId: string, errorCode: number, msg: string) => void): void;
|
|
2956
3004
|
/**
|
|
3005
|
+
* @private
|
|
2957
3006
|
* 初始化插件管理器
|
|
2958
3007
|
*
|
|
2959
3008
|
* @deprecated 请使用 [setPluginParams]{@link TRTCCloud#setPluginParams} 接口<br/>
|
|
@@ -2971,6 +3020,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2971
3020
|
bufferType?: TRTCVideoBufferType;
|
|
2972
3021
|
}): void;
|
|
2973
3022
|
/**
|
|
3023
|
+
* @private
|
|
2974
3024
|
* 销毁插件管理
|
|
2975
3025
|
*
|
|
2976
3026
|
* @deprecated 请使用 [setPluginParams]{@link TRTCCloud#setPluginParams} 接口
|
|
@@ -2978,6 +3028,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2978
3028
|
*/
|
|
2979
3029
|
destroyPluginManager(): void;
|
|
2980
3030
|
/**
|
|
3031
|
+
* @private
|
|
2981
3032
|
* 获取插件列表
|
|
2982
3033
|
* @returns TRTCPluginInfo[]|null
|
|
2983
3034
|
*
|
|
@@ -2987,10 +3038,12 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
2987
3038
|
getPluginList(): TRTCPluginInfo[] | null;
|
|
2988
3039
|
private _getKey;
|
|
2989
3040
|
/**
|
|
3041
|
+
* @private
|
|
2990
3042
|
* @deprecated
|
|
2991
3043
|
*/
|
|
2992
3044
|
setEnableRenderFrame(enable: boolean): void;
|
|
2993
3045
|
/**
|
|
3046
|
+
* @private
|
|
2994
3047
|
* @deprecated
|
|
2995
3048
|
*/
|
|
2996
3049
|
log(info: string): void;
|
|
@@ -3047,6 +3100,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
3047
3100
|
*/
|
|
3048
3101
|
private disableLocalRenderFPSOptimization;
|
|
3049
3102
|
/**
|
|
3103
|
+
* @private
|
|
3050
3104
|
* @deprecated
|
|
3051
3105
|
* 创建本地多媒体合图实例
|
|
3052
3106
|
*
|
|
@@ -3060,6 +3114,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
3060
3114
|
pixelFormat: TRTCVideoPixelFormat;
|
|
3061
3115
|
}): TRTCLocalMediaTranscoder | null;
|
|
3062
3116
|
/**
|
|
3117
|
+
* @private
|
|
3063
3118
|
* @deprecated
|
|
3064
3119
|
* 销毁本地多媒体合图实例
|
|
3065
3120
|
*/
|
|
@@ -3096,6 +3151,7 @@ declare class TRTCCloud extends EventEmitter implements ITRTCCloud {
|
|
|
3096
3151
|
*/
|
|
3097
3152
|
getMediaMixingManager(): TRTCMediaMixingManager | null;
|
|
3098
3153
|
/**
|
|
3154
|
+
* @private
|
|
3099
3155
|
* 获取本地混流服务对象
|
|
3100
3156
|
*
|
|
3101
3157
|
* 本地混流服务对象管理底层服务对象的启动、关闭,并可监听服务丢失事件,用来实现服务重启、恢复
|
package/liteav/trtc.js
CHANGED
|
@@ -320,6 +320,44 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
320
320
|
this.rtcCloud.setVideoRenderFPS(this.videoRenderFPS);
|
|
321
321
|
}
|
|
322
322
|
}
|
|
323
|
+
/**
|
|
324
|
+
* 销毁当前实例,释放资源
|
|
325
|
+
*/
|
|
326
|
+
destroy() {
|
|
327
|
+
var _a, _b;
|
|
328
|
+
if (TRTCCloud.isIPCMode) {
|
|
329
|
+
TRTCCloud.ipcModeReferenceCount = TRTCCloud.ipcModeReferenceCount - 1;
|
|
330
|
+
if (TRTCCloud.ipcModeReferenceCount > 0) {
|
|
331
|
+
return;
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
if (this === TRTCCloud.sharedTRTCCloudInstance) {
|
|
335
|
+
if (TRTCCloud.subInstances) {
|
|
336
|
+
TRTCCloud.subInstances.forEach(sub => {
|
|
337
|
+
this.logger.log('destroy sub cloud');
|
|
338
|
+
sub.destroy();
|
|
339
|
+
});
|
|
340
|
+
TRTCCloud.subInstances = [];
|
|
341
|
+
}
|
|
342
|
+
}
|
|
343
|
+
else {
|
|
344
|
+
TRTCCloud.subInstances = TRTCCloud.subInstances.filter((item) => { return item != this; });
|
|
345
|
+
}
|
|
346
|
+
VideoRenderFPSMonitor_1.videoRenderFPSMonitor.off('videoRenderFPS', this.onFPSChanged);
|
|
347
|
+
this.playAudioEffectIdList = [];
|
|
348
|
+
this.remoteFillModeMap.clear();
|
|
349
|
+
this.destroyLocalMediaTranscoder();
|
|
350
|
+
this.rtcCloud.destroy();
|
|
351
|
+
this.rtcCloud = null;
|
|
352
|
+
this.deviceManager.destroy();
|
|
353
|
+
this.audioEffectManager.destroy();
|
|
354
|
+
this.pluginManager.destroy();
|
|
355
|
+
(_a = this.mediaMixingService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
356
|
+
(_b = this.mediaMixingManager) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
357
|
+
Object.keys(this.paramsStore).forEach(key => {
|
|
358
|
+
delete this.paramsStore[key];
|
|
359
|
+
});
|
|
360
|
+
}
|
|
323
361
|
/**
|
|
324
362
|
* 创建子实例
|
|
325
363
|
*
|
|
@@ -348,6 +386,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
348
386
|
return new TRTCCloud(config);
|
|
349
387
|
}
|
|
350
388
|
/**
|
|
389
|
+
* @private
|
|
351
390
|
* 获取 TRTC 配置对象
|
|
352
391
|
*
|
|
353
392
|
* 可以通过 TRTC 配置对象 {@link TRTCConfig} 打开 debug 模式
|
|
@@ -364,6 +403,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
364
403
|
return util_1.config;
|
|
365
404
|
}
|
|
366
405
|
/**
|
|
406
|
+
* @private
|
|
367
407
|
* @deprecated
|
|
368
408
|
*/
|
|
369
409
|
setExternalRenderEnabled(enabled) {
|
|
@@ -379,49 +419,12 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
379
419
|
}
|
|
380
420
|
}
|
|
381
421
|
/**
|
|
422
|
+
* @private
|
|
382
423
|
* @deprecated
|
|
383
424
|
*/
|
|
384
425
|
setCaptureLocalVideoEnabled(enabled) {
|
|
385
426
|
this.isCaptureLocalVideoEnabled = enabled;
|
|
386
427
|
}
|
|
387
|
-
/**
|
|
388
|
-
* 销毁当前实例,释放资源
|
|
389
|
-
*/
|
|
390
|
-
destroy() {
|
|
391
|
-
var _a, _b;
|
|
392
|
-
if (TRTCCloud.isIPCMode) {
|
|
393
|
-
TRTCCloud.ipcModeReferenceCount = TRTCCloud.ipcModeReferenceCount - 1;
|
|
394
|
-
if (TRTCCloud.ipcModeReferenceCount > 0) {
|
|
395
|
-
return;
|
|
396
|
-
}
|
|
397
|
-
}
|
|
398
|
-
if (this === TRTCCloud.sharedTRTCCloudInstance) {
|
|
399
|
-
if (TRTCCloud.subInstances) {
|
|
400
|
-
TRTCCloud.subInstances.forEach(sub => {
|
|
401
|
-
this.logger.log('destroy sub cloud');
|
|
402
|
-
sub.destroy();
|
|
403
|
-
});
|
|
404
|
-
TRTCCloud.subInstances = [];
|
|
405
|
-
}
|
|
406
|
-
}
|
|
407
|
-
else {
|
|
408
|
-
TRTCCloud.subInstances = TRTCCloud.subInstances.filter((item) => { return item != this; });
|
|
409
|
-
}
|
|
410
|
-
VideoRenderFPSMonitor_1.videoRenderFPSMonitor.off('videoRenderFPS', this.onFPSChanged);
|
|
411
|
-
this.playAudioEffectIdList = [];
|
|
412
|
-
this.remoteFillModeMap.clear();
|
|
413
|
-
this.destroyLocalMediaTranscoder();
|
|
414
|
-
this.rtcCloud.destroy();
|
|
415
|
-
this.rtcCloud = null;
|
|
416
|
-
this.deviceManager.destroy();
|
|
417
|
-
this.audioEffectManager.destroy();
|
|
418
|
-
this.pluginManager.destroy();
|
|
419
|
-
(_a = this.mediaMixingService) === null || _a === void 0 ? void 0 : _a.destroy();
|
|
420
|
-
(_b = this.mediaMixingManager) === null || _b === void 0 ? void 0 : _b.destroy();
|
|
421
|
-
Object.keys(this.paramsStore).forEach(key => {
|
|
422
|
-
delete this.paramsStore[key];
|
|
423
|
-
});
|
|
424
|
-
}
|
|
425
428
|
/////////////////////////////////////////////////////////////////////////////////
|
|
426
429
|
//
|
|
427
430
|
// 设置 TRTCCallback 回调
|
|
@@ -2080,6 +2083,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2080
2083
|
* @param {String} streamId - 自定义流 ID。
|
|
2081
2084
|
* @param {TRTCVideoStreamType} type - 仅支持 TRTCVideoStreamTypeBig 和 TRTCVideoStreamTypeSub。
|
|
2082
2085
|
* @deprecated
|
|
2086
|
+
* @private
|
|
2083
2087
|
*/
|
|
2084
2088
|
startPublishing(streamId, type) {
|
|
2085
2089
|
this.rtcCloud.startPublishing(streamId, type);
|
|
@@ -2087,6 +2091,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2087
2091
|
/**
|
|
2088
2092
|
* 停止向腾讯云的直播 CDN 推流
|
|
2089
2093
|
* @deprecated
|
|
2094
|
+
* @private
|
|
2090
2095
|
*/
|
|
2091
2096
|
stopPublishing() {
|
|
2092
2097
|
this.rtcCloud.stopPublishing();
|
|
@@ -2105,6 +2110,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2105
2110
|
* @param {String} param.url - 指定该路音视频流在第三方直播服务商的推流地址,推流 URL 必须为 RTMP 格式,必须符合您的目标直播服务商的规范要求,否则目标服务商会拒绝来自 TRTC 后台服务的推流请求。
|
|
2106
2111
|
* @param {String} param.streamId - 需要转推的 streamId,默认值:空值。如果不填写,则默认转推调用者的旁路流。
|
|
2107
2112
|
* @deprecated
|
|
2113
|
+
* @private
|
|
2108
2114
|
*/
|
|
2109
2115
|
startPublishCDNStream(param) {
|
|
2110
2116
|
const streamId = param.streamId ? param.streamId.trim() : "";
|
|
@@ -2118,6 +2124,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2118
2124
|
/**
|
|
2119
2125
|
* 停止向非腾讯云的直播 CDN 推流
|
|
2120
2126
|
* @deprecated
|
|
2127
|
+
* @private
|
|
2121
2128
|
*/
|
|
2122
2129
|
stopPublishCDNStream() {
|
|
2123
2130
|
this.rtcCloud.stopPublishCDNStream();
|
|
@@ -2189,6 +2196,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2189
2196
|
* @param {Number} config.mixUsersArray[].soundLevel - 该路音频参与混音时的音量等级(取值范围:0 - 100),默认值:100。
|
|
2190
2197
|
* @param {String} config.mixUsersArray[].image - 占位图是指当对应 userId 混流内容为纯音频时,混合后的画面中显示的是占位图片。水印图是指一张贴在混合后画面中的半透明图片,这张图片会一直覆盖于混合后的画面上。当指定 inputType 为 TRTCMixInputTypePureAudio 时,image 为占位图,此时需要您指定 userId。当指定 inputType 为 TRTCMixInputTypeWatermark 时,image 为水印图,此时不需要您指定 userId。
|
|
2191
2198
|
* @deprecated
|
|
2199
|
+
* @private
|
|
2192
2200
|
*/
|
|
2193
2201
|
setMixTranscodingConfig(config) {
|
|
2194
2202
|
if (config === null) {
|
|
@@ -2475,6 +2483,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2475
2483
|
}
|
|
2476
2484
|
/**
|
|
2477
2485
|
* 修改远端视频渲染的 HTML 元素
|
|
2486
|
+
*
|
|
2478
2487
|
* 本接口用于切换显示区域的交互场景中,修改远端视频渲染的 HTML 元素。
|
|
2479
2488
|
*
|
|
2480
2489
|
* 注意:必须调用 [startRemoteView()]{@link TRTCCloud#startRemoteView} 订阅了远端视频流之后,调用此接口才会生效。
|
|
@@ -2618,6 +2627,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2618
2627
|
this.rtcCloud.setLocalRenderParams(params);
|
|
2619
2628
|
}
|
|
2620
2629
|
/**
|
|
2630
|
+
* @private
|
|
2621
2631
|
* 废弃接口: 设置本地图像的渲染模式
|
|
2622
2632
|
*
|
|
2623
2633
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -2661,6 +2671,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2661
2671
|
this.rtcCloud.setRemoteRenderParams(userId, streamType, params);
|
|
2662
2672
|
}
|
|
2663
2673
|
/**
|
|
2674
|
+
* @private
|
|
2664
2675
|
* 废弃接口: 设置远端图像的渲染模式
|
|
2665
2676
|
*
|
|
2666
2677
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setRemoteRenderParams 接口替代。
|
|
@@ -2681,6 +2692,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2681
2692
|
}
|
|
2682
2693
|
}
|
|
2683
2694
|
/**
|
|
2695
|
+
* @private
|
|
2684
2696
|
* 废弃接口: 设置本地图像的顺时针旋转角度
|
|
2685
2697
|
*
|
|
2686
2698
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -2699,6 +2711,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2699
2711
|
this.setLocalRenderParams(params);
|
|
2700
2712
|
}
|
|
2701
2713
|
/**
|
|
2714
|
+
* @private
|
|
2702
2715
|
* 废弃接口: 设置远端图像的顺时针旋转角度
|
|
2703
2716
|
*
|
|
2704
2717
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setRemoteRenderParams 接口替代。
|
|
@@ -2729,6 +2742,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2729
2742
|
this.rtcCloud.setVideoEncoderRotation(rotation);
|
|
2730
2743
|
}
|
|
2731
2744
|
/**
|
|
2745
|
+
* @private
|
|
2732
2746
|
* 废弃接口: 设置本地摄像头预览画面的镜像模式
|
|
2733
2747
|
*
|
|
2734
2748
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setLocalRenderParams 接口替代。
|
|
@@ -2811,6 +2825,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2811
2825
|
this.rtcCloud.snapshotVideo(userId, type, snapshotSourceTypeStream);
|
|
2812
2826
|
}
|
|
2813
2827
|
/**
|
|
2828
|
+
* @private
|
|
2814
2829
|
* 废弃接口: 设定观看方优先选择的视频质量
|
|
2815
2830
|
*
|
|
2816
2831
|
* 低端设备推荐优先选择低清晰度的小画面。
|
|
@@ -3137,6 +3152,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3137
3152
|
this.rtcCloud.setAudioQuality(quality);
|
|
3138
3153
|
}
|
|
3139
3154
|
/**
|
|
3155
|
+
* @private
|
|
3140
3156
|
* 废弃接口:设置麦克风的音量大小
|
|
3141
3157
|
*
|
|
3142
3158
|
* @deprecated 从 TRTCSDK6.9 后该接口已被废弃,请使用 setAudioCaptureVolume 接口替代。
|
|
@@ -3426,6 +3442,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3426
3442
|
//
|
|
3427
3443
|
/////////////////////////////////////////////////////////////////////////////////
|
|
3428
3444
|
/**
|
|
3445
|
+
* @private
|
|
3429
3446
|
* 废弃接口: 开始显示远端用户的辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)
|
|
3430
3447
|
*
|
|
3431
3448
|
* - startRemoteView() 用于显示主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)。
|
|
@@ -3442,6 +3459,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3442
3459
|
this.startRemoteView(userId, view, trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub);
|
|
3443
3460
|
}
|
|
3444
3461
|
/**
|
|
3462
|
+
* @private
|
|
3445
3463
|
* 废弃接口: 停止显示远端用户的辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)。
|
|
3446
3464
|
*
|
|
3447
3465
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopRemoteView 接口替代。
|
|
@@ -3452,6 +3470,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3452
3470
|
this.stopRemoteView(userId, trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub);
|
|
3453
3471
|
}
|
|
3454
3472
|
/**
|
|
3473
|
+
* @private
|
|
3455
3474
|
* 废弃接口: 设置辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)的显示模式。
|
|
3456
3475
|
*
|
|
3457
3476
|
* - setRemoteViewFillMode() 用于设置远端主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)的显示模式。
|
|
@@ -3476,6 +3495,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3476
3495
|
}
|
|
3477
3496
|
}
|
|
3478
3497
|
/**
|
|
3498
|
+
* @private
|
|
3479
3499
|
* 废弃接口: 设置辅路画面(TRTCVideoStreamTypeSub,一般用于屏幕分享)的顺时针旋转角度
|
|
3480
3500
|
*
|
|
3481
3501
|
* - setRemoteViewRotation() 用于设置远端主路画面(TRTCVideoStreamTypeBig,一般用于摄像头)的旋转角度。
|
|
@@ -3616,7 +3636,10 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3616
3636
|
* 一个用户同时最多只能上传一条主路(TRTCVideoStreamTypeBig)画面和一条辅路(TRTCVideoStreamTypeSub)画面,
|
|
3617
3637
|
* 默认情况下,屏幕分享使用辅路画面,如果使用主路画面,建议您提前停止摄像头采集(stopLocalPreview)避免相互冲突。
|
|
3618
3638
|
*
|
|
3619
|
-
* @param {HTMLElement}
|
|
3639
|
+
* @param {Array<HTMLElement>|HTMLElement|null} views - 承载预览画面的单个 HTML 块节点或者 HTML 块节点数组
|
|
3640
|
+
* - 传入单个 HTML 块节点:在该节点上预览屏幕分享画面。
|
|
3641
|
+
* - 传入 HTML 块节点数组:在多个节点上同时预览同一路屏幕分享画面(多路预览),适用于双屏/多窗口场景。
|
|
3642
|
+
* - 传入 `null`:不预览屏幕分享画面,但不影响屏幕分享的采集与上行;此时若设置了 [setLocalVideoRenderCallback()]{@link TRTCCloud#setLocalVideoRenderCallback} 自定义渲染回调,可通过回调获取屏幕分享的视频帧自行渲染。
|
|
3620
3643
|
* @param {TRTCVideoStreamType} type 屏幕分享使用的线路,可以设置为主路(TRTCVideoStreamTypeBig)或者辅路(TRTCVideoStreamTypeSub),默认使用辅路。
|
|
3621
3644
|
* @param {TRTCVideoEncParam} params 屏幕分享的画面编码参数,可以设置为 null,表示让 SDK 选择最佳的编码参数(分辨率、码率等)。即使在调用 startScreenCapture 时设置 type=TRTCVideoStreamTypeBig,依然可以使用此接口更新屏幕分享的编码参数。
|
|
3622
3645
|
*
|
|
@@ -3662,12 +3685,20 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3662
3685
|
* );
|
|
3663
3686
|
*
|
|
3664
3687
|
* rtcCloud.startScreenCapture(
|
|
3665
|
-
* view, // HTML Element
|
|
3688
|
+
* view, // 单个 HTML Element
|
|
3689
|
+
* TRTCVideoStreamType.TRTCVideoStreamTypeSub,
|
|
3690
|
+
* screenShareEncParam,
|
|
3691
|
+
* );
|
|
3692
|
+
*
|
|
3693
|
+
* @example
|
|
3694
|
+
* // 屏幕分享多路预览:同一路屏幕分享画面同时渲染到多个 HTML 元素上
|
|
3695
|
+
* rtcCloud.startScreenCapture(
|
|
3696
|
+
* [viewOnCurrentScreen, viewOnExtendedScreen], // HTML Element 数组
|
|
3666
3697
|
* TRTCVideoStreamType.TRTCVideoStreamTypeSub,
|
|
3667
3698
|
* screenShareEncParam,
|
|
3668
3699
|
* );
|
|
3669
3700
|
*/
|
|
3670
|
-
startScreenCapture(
|
|
3701
|
+
startScreenCapture(views = null, type = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub, params = null) {
|
|
3671
3702
|
if ((type !== trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub && type !== trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig)) {
|
|
3672
3703
|
type = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub;
|
|
3673
3704
|
}
|
|
@@ -3680,12 +3711,15 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3680
3711
|
this.stopScreenCapture();
|
|
3681
3712
|
}
|
|
3682
3713
|
this.screenCaptureStreamType = type;
|
|
3683
|
-
if (
|
|
3684
|
-
if (
|
|
3714
|
+
if (views !== undefined) {
|
|
3715
|
+
if (views !== null) {
|
|
3685
3716
|
const key = this._getKey(LOCAL_USER_VIDEO_ID, type);
|
|
3686
|
-
this._initRenderer(key, [
|
|
3717
|
+
this._initRenderer(key, Array.isArray(views) ? views : [views]);
|
|
3687
3718
|
}
|
|
3688
|
-
this.localVideoRenderController.startScreenCapture(
|
|
3719
|
+
this.localVideoRenderController.startScreenCapture(views);
|
|
3720
|
+
}
|
|
3721
|
+
else {
|
|
3722
|
+
this.logger.error('startScreenCapture parameter views is undefined, it should be Array<HTMLElement>, HTMLElement or null');
|
|
3689
3723
|
}
|
|
3690
3724
|
if (params) {
|
|
3691
3725
|
this.rtcCloud.startScreenCapture(type, params);
|
|
@@ -3996,7 +4030,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3996
4030
|
* import TRTCCloud from 'trtc-electron-sdk';
|
|
3997
4031
|
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
3998
4032
|
* trtc.setLocalVideoRenderCallback(TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
3999
|
-
* onRenderVideoFrame(userId, streamType, frame) {
|
|
4033
|
+
* onRenderVideoFrame: function(userId, streamType, frame) {
|
|
4000
4034
|
* // 处理本地视频帧的回调
|
|
4001
4035
|
* }
|
|
4002
4036
|
* });
|
|
@@ -4055,7 +4089,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4055
4089
|
* import TRTCCloud from 'trtc-electron-sdk';
|
|
4056
4090
|
* const trtcCloud = TRTCCloud.getTRTCShareInstance();
|
|
4057
4091
|
* trtc.setRemoteVideoRenderCallback('remoteUserId', TRTCVideoPixelFormat.TRTCVideoPixelFormat_I420, TRTCVideoBufferType.TRTCVideoBufferType_Buffer, {
|
|
4058
|
-
* onRenderVideoFrame(userId, streamType, frame) {
|
|
4092
|
+
* onRenderVideoFrame: function(userId, streamType, frame) {
|
|
4059
4093
|
* // 处理远端视频帧的回调
|
|
4060
4094
|
* }
|
|
4061
4095
|
* });
|
|
@@ -4160,6 +4194,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4160
4194
|
//
|
|
4161
4195
|
/////////////////////////////////////////////////////////////////////////////////
|
|
4162
4196
|
/**
|
|
4197
|
+
* @private
|
|
4163
4198
|
* 废弃接口: 启动播放背景音乐
|
|
4164
4199
|
*
|
|
4165
4200
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 startPlayMusic 接口替代。
|
|
@@ -4174,6 +4209,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4174
4209
|
this.startPlayMusic(musicParam);
|
|
4175
4210
|
}
|
|
4176
4211
|
/**
|
|
4212
|
+
* @private
|
|
4177
4213
|
* 废弃接口: 停止播放背景音乐
|
|
4178
4214
|
*
|
|
4179
4215
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopPlayMusic 接口替代。
|
|
@@ -4183,6 +4219,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4183
4219
|
this.stopPlayMusic(this.bgmId);
|
|
4184
4220
|
}
|
|
4185
4221
|
/**
|
|
4222
|
+
* @private
|
|
4186
4223
|
* 废弃接口: 暂停播放背景音乐
|
|
4187
4224
|
*
|
|
4188
4225
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 pausePlayMusic 接口替代。
|
|
@@ -4192,6 +4229,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4192
4229
|
this.pausePlayMusic(this.bgmId);
|
|
4193
4230
|
}
|
|
4194
4231
|
/**
|
|
4232
|
+
* @private
|
|
4195
4233
|
* 废弃接口: 继续播放背景音乐
|
|
4196
4234
|
*
|
|
4197
4235
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 resumePlayMusic 接口替代。
|
|
@@ -4201,6 +4239,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4201
4239
|
this.resumePlayMusic(this.bgmId);
|
|
4202
4240
|
}
|
|
4203
4241
|
/**
|
|
4242
|
+
* @private
|
|
4204
4243
|
* 废弃接口: 获取背景音乐文件总时长,单位毫秒
|
|
4205
4244
|
*
|
|
4206
4245
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 getMusicDurationInMS 接口替代。
|
|
@@ -4212,6 +4251,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4212
4251
|
return this.getMusicDurationInMS(path);
|
|
4213
4252
|
}
|
|
4214
4253
|
/**
|
|
4254
|
+
* @private
|
|
4215
4255
|
* 废弃接口: 设置背景音乐播放进度
|
|
4216
4256
|
*
|
|
4217
4257
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 seekMusicToPosInTime 接口替代。
|
|
@@ -4222,6 +4262,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4222
4262
|
this.seekMusicToPosInTime(this.bgmId, pos);
|
|
4223
4263
|
}
|
|
4224
4264
|
/**
|
|
4265
|
+
* @private
|
|
4225
4266
|
* 废弃接口: 设置背景音乐的音量大小,播放背景音乐混音时使用,用来控制背景音音量大小
|
|
4226
4267
|
*
|
|
4227
4268
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 setAllMusicVolume 接口替代。
|
|
@@ -4232,6 +4273,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4232
4273
|
this.setAllMusicVolume(volume);
|
|
4233
4274
|
}
|
|
4234
4275
|
/**
|
|
4276
|
+
* @private
|
|
4235
4277
|
* 废弃接口: 设置背景音乐本地播放音量的大小
|
|
4236
4278
|
*
|
|
4237
4279
|
* 播放背景音乐混音时使用,用来控制背景音乐在本地播放时的音量大小。
|
|
@@ -4244,6 +4286,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4244
4286
|
this.setMusicPlayoutVolume(this.bgmId, volume);
|
|
4245
4287
|
}
|
|
4246
4288
|
/**
|
|
4289
|
+
* @private
|
|
4247
4290
|
* 废弃接口: 设置背景音乐远端播放音量的大小
|
|
4248
4291
|
*
|
|
4249
4292
|
* 播放背景音乐混音时使用,用来控制背景音乐在远端播放时的音量大小。
|
|
@@ -4521,6 +4564,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4521
4564
|
//
|
|
4522
4565
|
/////////////////////////////////////////////////////////////////////////////////
|
|
4523
4566
|
/**
|
|
4567
|
+
* @private
|
|
4524
4568
|
* 废弃接口: 播放音效
|
|
4525
4569
|
*
|
|
4526
4570
|
* 每个音效都需要您指定具体的 ID,您可以通过该 ID 对音效的开始、停止、音量等进行设置。
|
|
@@ -4543,6 +4587,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4543
4587
|
}
|
|
4544
4588
|
}
|
|
4545
4589
|
/**
|
|
4590
|
+
* @private
|
|
4546
4591
|
* 废弃接口: 设置音效音量
|
|
4547
4592
|
*
|
|
4548
4593
|
* 注意:会覆盖通过 setAllAudioEffectsVolume 指定的整体音效音量。
|
|
@@ -4557,6 +4602,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4557
4602
|
this.setMusicPlayoutVolume(effectId, volume);
|
|
4558
4603
|
}
|
|
4559
4604
|
/**
|
|
4605
|
+
* @private
|
|
4560
4606
|
* 废弃接口: 停止音效
|
|
4561
4607
|
*
|
|
4562
4608
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 stopPlayMusic 接口替代。
|
|
@@ -4568,6 +4614,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4568
4614
|
this.playAudioEffectIdList = this.playAudioEffectIdList.filter(id => id !== effectId);
|
|
4569
4615
|
}
|
|
4570
4616
|
/**
|
|
4617
|
+
* @private
|
|
4571
4618
|
* 废弃接口: 停止所有音效
|
|
4572
4619
|
*
|
|
4573
4620
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃
|
|
@@ -4580,6 +4627,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4580
4627
|
this.playAudioEffectIdList = [];
|
|
4581
4628
|
}
|
|
4582
4629
|
/**
|
|
4630
|
+
* @private
|
|
4583
4631
|
* 废弃接口: 设置所有音效的音量
|
|
4584
4632
|
*
|
|
4585
4633
|
* 注意:该操作会覆盖通过 setAudioEffectVolume 指定的单独音效音量。
|
|
@@ -4592,6 +4640,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4592
4640
|
this.setAllMusicVolume(volume);
|
|
4593
4641
|
}
|
|
4594
4642
|
/**
|
|
4643
|
+
* @private
|
|
4595
4644
|
* 废弃接口: 暂停音效
|
|
4596
4645
|
*
|
|
4597
4646
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 pausePlayMusic 接口替代。
|
|
@@ -4602,6 +4651,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4602
4651
|
this.pausePlayMusic(effectId);
|
|
4603
4652
|
}
|
|
4604
4653
|
/**
|
|
4654
|
+
* @private
|
|
4605
4655
|
* 废弃接口: 恢复音效
|
|
4606
4656
|
*
|
|
4607
4657
|
* @deprecated 从 TRTCSDK 8.0 后该接口已被废弃,请使用 resumePlayMusic 接口替代。
|
|
@@ -4914,6 +4964,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4914
4964
|
// Render Mode API
|
|
4915
4965
|
//----------------------------------//
|
|
4916
4966
|
/**
|
|
4967
|
+
* @private
|
|
4917
4968
|
* 废弃接口:选择绘制的模式 (webgl/yuvcanvs/)
|
|
4918
4969
|
*
|
|
4919
4970
|
* @deprecated 从 10.3.403 版本该接口被废弃。SDK 内部会根据视频流数据,自动选择合适的渲染方式,可能的渲染方式有 WebGL、Canvas 2D、video 标签。调用该接口不再修改视频的渲染方式。
|
|
@@ -4987,6 +5038,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
4987
5038
|
this.pluginManager.setCallback(pluginCallback);
|
|
4988
5039
|
}
|
|
4989
5040
|
/**
|
|
5041
|
+
* @private
|
|
4990
5042
|
* 初始化插件管理器
|
|
4991
5043
|
*
|
|
4992
5044
|
* @deprecated 请使用 [setPluginParams]{@link TRTCCloud#setPluginParams} 接口<br/>
|
|
@@ -5008,6 +5060,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5008
5060
|
}
|
|
5009
5061
|
}
|
|
5010
5062
|
/**
|
|
5063
|
+
* @private
|
|
5011
5064
|
* 销毁插件管理
|
|
5012
5065
|
*
|
|
5013
5066
|
* @deprecated 请使用 [setPluginParams]{@link TRTCCloud#setPluginParams} 接口
|
|
@@ -5021,6 +5074,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5021
5074
|
}
|
|
5022
5075
|
}
|
|
5023
5076
|
/**
|
|
5077
|
+
* @private
|
|
5024
5078
|
* 获取插件列表
|
|
5025
5079
|
* @returns TRTCPluginInfo[]|null
|
|
5026
5080
|
*
|
|
@@ -5037,6 +5091,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5037
5091
|
return String(uid) + '_' + String(type);
|
|
5038
5092
|
}
|
|
5039
5093
|
/**
|
|
5094
|
+
* @private
|
|
5040
5095
|
* @deprecated
|
|
5041
5096
|
*/
|
|
5042
5097
|
setEnableRenderFrame(enable) {
|
|
@@ -5044,6 +5099,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5044
5099
|
this.enableRenderFrame = enable;
|
|
5045
5100
|
}
|
|
5046
5101
|
/**
|
|
5102
|
+
* @private
|
|
5047
5103
|
* @deprecated
|
|
5048
5104
|
*/
|
|
5049
5105
|
log(info) {
|
|
@@ -5072,7 +5128,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5072
5128
|
}
|
|
5073
5129
|
else {
|
|
5074
5130
|
if (uid.length == 0) {
|
|
5075
|
-
if (this.localVideoCallback !== null && this.localVideoCallback.callback !== null
|
|
5131
|
+
if (this.localVideoCallback !== null && this.localVideoCallback.callback !== null) {
|
|
5076
5132
|
this._onUserRenderCallback(this.localVideoCallback.callback, this.localVideoCallback.pixelFormat, uid, type, width, height, timestamp, rotation, data);
|
|
5077
5133
|
}
|
|
5078
5134
|
else {
|
|
@@ -5488,6 +5544,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5488
5544
|
//
|
|
5489
5545
|
/////////////////////////////////////////////////////////////////////////////////
|
|
5490
5546
|
/**
|
|
5547
|
+
* @private
|
|
5491
5548
|
* @deprecated
|
|
5492
5549
|
* 创建本地多媒体合图实例
|
|
5493
5550
|
*
|
|
@@ -5514,6 +5571,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5514
5571
|
return this.localMediaTranscoder;
|
|
5515
5572
|
}
|
|
5516
5573
|
/**
|
|
5574
|
+
* @private
|
|
5517
5575
|
* @deprecated
|
|
5518
5576
|
* 销毁本地多媒体合图实例
|
|
5519
5577
|
*/
|
|
@@ -5581,6 +5639,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
5581
5639
|
return this.mediaMixingManager;
|
|
5582
5640
|
}
|
|
5583
5641
|
/**
|
|
5642
|
+
* @private
|
|
5584
5643
|
* 获取本地混流服务对象
|
|
5585
5644
|
*
|
|
5586
5645
|
* 本地混流服务对象管理底层服务对象的启动、关闭,并可监听服务丢失事件,用来实现服务重启、恢复
|
package/liteav/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import TRTCMediaMixingManager, { TRTCMediaMixingService } from './extensions/MediaMixingManager';
|
|
2
|
-
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceType, TRTCLogLevel, TRTCAudioFrame, TRTCVideoFillMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, TRTCPluginType, TRTCPluginInfo, TRTCVideoProcessPluginOptions, TRTCMediaEncryptDecryptPluginOptions, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer, TRTCInitConfig, TRTCAudioParallelParams, TRTCVoiceReverbType, TRTCVoiceChangerType, TRTCMusicPlayObserver, TRTCAudioFrameCallback, TRTCAudioProcessPluginOptions, TRTCPublishTarget, TRTCStreamEncoderParam, TRTCStreamMixingConfig, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoBufferType } from './trtc_define';
|
|
2
|
+
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceType, TRTCLogLevel, TRTCAudioFrame, TRTCVideoFillMode, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, TRTCPluginType, TRTCPluginInfo, TRTCVideoProcessPluginOptions, TRTCMediaEncryptDecryptPluginOptions, TRTCAudioRecordingParams, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty, TRTCSpeedTestParams, TRTCRecordType, TRTCDeviceInfo, TRTCCameraCaptureParams, TRTCImageBuffer, TRTCInitConfig, TRTCAudioParallelParams, TRTCVoiceReverbType, TRTCVoiceChangerType, TRTCMusicPlayObserver, TRTCAudioFrameCallback, TRTCAudioProcessPluginOptions, TRTCPublishTarget, TRTCStreamEncoderParam, TRTCStreamMixingConfig, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoBufferType, TRTCVideoEncParam } from './trtc_define';
|
|
3
3
|
import { TRTCVodPlayerEventMap } from './vod_player';
|
|
4
4
|
export interface TRTCVideoRenderCallback {
|
|
5
5
|
onRenderVideoFrame(userId: string, streamType: TRTCVideoStreamType, frame: TRTCVideoFrame): void;
|
|
@@ -112,7 +112,7 @@ export interface ITRTCCloud {
|
|
|
112
112
|
setWaterMark(streamType: TRTCVideoStreamType, srcData: ArrayBuffer | string | null, srcType: TRTCWaterMarkSrcType, nWidth: number, nHeight: number, xOffset: number, yOffset: number, fWidthRatio: number): void;
|
|
113
113
|
getScreenCaptureSources(thumbWidth: number, thumbHeight: number, iconWidth: number, iconHeight: number): Array<TRTCScreenCaptureSourceInfo>;
|
|
114
114
|
selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean): void;
|
|
115
|
-
startScreenCapture(
|
|
115
|
+
startScreenCapture(views: Array<HTMLElement> | HTMLElement | null, type: TRTCVideoStreamType, params: TRTCVideoEncParam | undefined | null): void;
|
|
116
116
|
pauseScreenCapture(): void;
|
|
117
117
|
resumeScreenCapture(): void;
|
|
118
118
|
stopScreenCapture(): void;
|