trtc-electron-sdk 9.5.0-beta.0 → 9.5.8-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.
- package/liteav/Render/SoftwareRenderer/index.js +1 -38
- package/liteav/trtc.d.ts +8 -2
- package/liteav/trtc.js +29 -4
- package/liteav/trtc_define.d.ts +25 -4
- package/liteav/trtc_define.js +28 -5
- package/package.json +1 -1
|
@@ -74,6 +74,7 @@ class Renderer {
|
|
|
74
74
|
this.yuv = null;
|
|
75
75
|
this.element = null;
|
|
76
76
|
this.canvas = null;
|
|
77
|
+
this.view = null;
|
|
77
78
|
}
|
|
78
79
|
refreshCanvas() {
|
|
79
80
|
}
|
|
@@ -108,49 +109,11 @@ class Renderer {
|
|
|
108
109
|
this.canvas.style.transform = 'rotateY(180deg)';
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
_adjustImageData(imageData) {
|
|
112
|
-
const { width, height, yUint8Array, uUint8Array, vUint8Array } = imageData;
|
|
113
|
-
const widthBase = 8;
|
|
114
|
-
const w8Modulo = width % widthBase;
|
|
115
|
-
if (w8Modulo !== 0) {
|
|
116
|
-
const newWidth = width - w8Modulo;
|
|
117
|
-
const newYSize = newWidth * height;
|
|
118
|
-
const newYArrayBuffer = new ArrayBuffer(newYSize);
|
|
119
|
-
const newYUint8Array = new Uint8Array(newYArrayBuffer);
|
|
120
|
-
let oldIndex = -1, newIndex = -1;
|
|
121
|
-
for (let h = 0; h < height; h += 1) {
|
|
122
|
-
for (let w = 0; w < newWidth; w += 1) {
|
|
123
|
-
oldIndex = width * h + w;
|
|
124
|
-
newIndex = newWidth * h + w;
|
|
125
|
-
newYUint8Array[newIndex] = yUint8Array[oldIndex];
|
|
126
|
-
}
|
|
127
|
-
}
|
|
128
|
-
const oldChromaWidth = width / 2;
|
|
129
|
-
const newChromaWidth = newWidth / 2;
|
|
130
|
-
const chromaHeight = height / 2;
|
|
131
|
-
const newChromaSize = newChromaWidth * chromaHeight;
|
|
132
|
-
const newUArrayBuffer = new ArrayBuffer(newChromaSize);
|
|
133
|
-
const newUInt8Array = new Uint8Array(newUArrayBuffer);
|
|
134
|
-
const newVArrayBuffer = new ArrayBuffer(newChromaSize);
|
|
135
|
-
const newVInt8Array = new Uint8Array(newVArrayBuffer);
|
|
136
|
-
for (let h = 0; h < chromaHeight; h += 1) {
|
|
137
|
-
for (let w = 0; w < newChromaWidth; w += 1) {
|
|
138
|
-
oldIndex = oldChromaWidth * h + w;
|
|
139
|
-
newIndex = newChromaWidth * h + w;
|
|
140
|
-
newUInt8Array[newIndex] = uUint8Array[oldIndex];
|
|
141
|
-
newVInt8Array[newIndex] = vUint8Array[oldIndex];
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return Object.assign(Object.assign({}, imageData), { width: newWidth, height, yUint8Array: newYUint8Array, uUint8Array: newUInt8Array, vUint8Array: newVInt8Array });
|
|
145
|
-
}
|
|
146
|
-
return imageData;
|
|
147
|
-
}
|
|
148
112
|
drawFrame(imageData) {
|
|
149
113
|
if (!this.ready) {
|
|
150
114
|
this.ready = true;
|
|
151
115
|
this.event.emit('ready');
|
|
152
116
|
}
|
|
153
|
-
imageData = this._adjustImageData(imageData);
|
|
154
117
|
const mirror = 0;
|
|
155
118
|
const contentWidth = imageData.width;
|
|
156
119
|
const contentHeight = imageData.height;
|
package/liteav/trtc.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/// <reference types="node" />
|
|
2
2
|
import { EventEmitter } from 'events';
|
|
3
|
-
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo } from './trtc_define';
|
|
3
|
+
import { AudioMusicParam, Rect, TRTCAppScene, TRTCAudioEffectParam, TRTCAudioQuality, TRTCBeautyStyle, TRTCDeviceState, TRTCDeviceType, TRTCLogLevel, TRTCRenderParams, TRTCRoleType, TRTCSwitchRoomParam, TRTCVideoBufferType, TRTCVideoFillMode, TRTCVideoFrame, TRTCVideoPixelFormat, TRTCVideoRotation, TRTCVideoStreamType, TRTCWaterMarkSrcType, PluginInfo, TRTCScreenCaptureSourceInfo, TRTCScreenCaptureProperty } from './trtc_define';
|
|
4
4
|
export * from './trtc_define';
|
|
5
5
|
export * from './trtc_code';
|
|
6
6
|
/**
|
|
@@ -40,6 +40,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
40
40
|
private bgmId;
|
|
41
41
|
private playAudioEffectIdList;
|
|
42
42
|
private enableRenderFrame;
|
|
43
|
+
private userStreamFrameRecord;
|
|
43
44
|
constructor();
|
|
44
45
|
/**
|
|
45
46
|
* 创建 TRTCCloud 对象单例
|
|
@@ -1428,6 +1429,11 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1428
1429
|
* - 共享指定区域:sourceInfoList 中 type 为 Screen 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
1429
1430
|
* - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
|
|
1430
1431
|
* - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
1432
|
+
* @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
|
|
1433
|
+
* @param {Rect} captureRect - 指定捕获的区域
|
|
1434
|
+
* @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
|
|
1435
|
+
*
|
|
1436
|
+
* 废弃参数使用方法(针对 9.3 以下版本):
|
|
1431
1437
|
*
|
|
1432
1438
|
* @param {TRTCScreenCaptureSourceType} type - 采集源类型
|
|
1433
1439
|
* - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
|
|
@@ -1443,7 +1449,7 @@ declare class TRTCCloud extends EventEmitter {
|
|
|
1443
1449
|
* @param {Boolean} captureMouse - 指定是否捕获鼠标指针
|
|
1444
1450
|
* @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
|
|
1445
1451
|
*/
|
|
1446
|
-
selectScreenCaptureTarget(
|
|
1452
|
+
selectScreenCaptureTarget(source: TRTCScreenCaptureSourceInfo | number, captureRect: Rect | string, property: TRTCScreenCaptureProperty | string, deprecatedCaptureRect?: Rect, captureMouse?: boolean, highlightWindow?: boolean): any;
|
|
1447
1453
|
/**
|
|
1448
1454
|
* 8.7 启动屏幕分享,支持选择使用主路或辅路进行屏幕分享。(暂不支持 mac 平台预览界面)
|
|
1449
1455
|
*
|
package/liteav/trtc.js
CHANGED
|
@@ -131,6 +131,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
131
131
|
this.remoteVideoCallback = new Map();
|
|
132
132
|
secMethods(this);
|
|
133
133
|
this.callExperimentalAPI("{\"api\":\"setCurrentEnvironment\",\"params\" :{\"electron\":true}}");
|
|
134
|
+
this.userStreamFrameRecord = new Map();
|
|
134
135
|
}
|
|
135
136
|
/**
|
|
136
137
|
* 创建 TRTCCloud 对象单例
|
|
@@ -1300,7 +1301,7 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
1300
1301
|
*/
|
|
1301
1302
|
startPublishCDNStream(param) {
|
|
1302
1303
|
if (param instanceof trtc_define_1.TRTCPublishCDNParam) {
|
|
1303
|
-
this.rtcCloud.startPublishCDNStream(param.appId, param.bizId, param.url
|
|
1304
|
+
this.rtcCloud.startPublishCDNStream(param.appId, param.bizId, param.url);
|
|
1304
1305
|
}
|
|
1305
1306
|
else {
|
|
1306
1307
|
console.error('startPublishCDNStream, param is not instanceof TRTCPublishCDNParam!');
|
|
@@ -2289,6 +2290,11 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2289
2290
|
* - 共享指定区域:sourceInfoList 中 type 为 Screen 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
2290
2291
|
* - 共享整个窗口:sourceInfoList 中 type 为 Window 的 source,captureRect 设为 { 0, 0, 0, 0 }
|
|
2291
2292
|
* - 共享窗口区域:sourceInfoList 中 type 为 Window 的 source,captureRect 设为非 NULL,例如 { 100, 100, 300, 300 }
|
|
2293
|
+
* @param {TRTCScreenCaptureSourceInfo} source - 指定分享源,详情参考TRTCScreenCaptureSourceInfo 定义
|
|
2294
|
+
* @param {Rect} captureRect - 指定捕获的区域
|
|
2295
|
+
* @param {TRTCScreenCaptureProperty} property - 指定屏幕分享目标的属性,包括捕获鼠标,高亮捕获窗口等,详情参考TRTCScreenCaptureProperty 定义
|
|
2296
|
+
*
|
|
2297
|
+
* 废弃参数使用方法(针对 9.3 以下版本):
|
|
2292
2298
|
*
|
|
2293
2299
|
* @param {TRTCScreenCaptureSourceType} type - 采集源类型
|
|
2294
2300
|
* - TRTCScreenCaptureSourceTypeWindow: 该分享目标是某一个Windows窗口
|
|
@@ -2304,9 +2310,19 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2304
2310
|
* @param {Boolean} captureMouse - 指定是否捕获鼠标指针
|
|
2305
2311
|
* @param {Boolean} highlightWindow - 指定是否高亮正在共享的窗口,以及当捕获图像被遮挡时高亮遮挡窗口提示用户移走遮挡
|
|
2306
2312
|
*/
|
|
2307
|
-
selectScreenCaptureTarget(
|
|
2308
|
-
if (
|
|
2309
|
-
return this.rtcCloud.selectScreenCaptureTarget(type, sourceId,
|
|
2313
|
+
selectScreenCaptureTarget(source, captureRect, property, deprecatedCaptureRect, captureMouse, highlightWindow) {
|
|
2314
|
+
if (source && typeof source !== 'number' && captureRect instanceof trtc_define_1.Rect && property instanceof trtc_define_1.TRTCScreenCaptureProperty) {
|
|
2315
|
+
return this.rtcCloud.selectScreenCaptureTarget(source.type, source.sourceId, source.sourceName, source.isMinimizeWindow, captureRect.left, captureRect.top, captureRect.right, captureRect.bottom, property.enableCaptureMouse, property.enableHighLight, property.enableHighPerformance, property.highLightColor, property.highLightWidth, property.enableCaptureChildWindow);
|
|
2316
|
+
}
|
|
2317
|
+
const type = source;
|
|
2318
|
+
const sourceId = captureRect;
|
|
2319
|
+
const sourcename = property;
|
|
2320
|
+
if (sourceId !== null && sourceId !== undefined && sourcename !== null
|
|
2321
|
+
&& sourcename !== undefined && deprecatedCaptureRect !== undefined && captureMouse !== undefined
|
|
2322
|
+
&& highlightWindow !== undefined) {
|
|
2323
|
+
const selSource = new trtc_define_1.TRTCScreenCaptureSourceInfo(type, sourceId, sourcename);
|
|
2324
|
+
const selProperty = new trtc_define_1.TRTCScreenCaptureProperty(captureMouse, highlightWindow);
|
|
2325
|
+
return this.rtcCloud.selectScreenCaptureTarget(selSource.type, selSource.sourceId, selSource.sourceName, selSource.isMinimizeWindow, deprecatedCaptureRect.left, deprecatedCaptureRect.top, deprecatedCaptureRect.right, deprecatedCaptureRect.bottom, selProperty.enableCaptureMouse, selProperty.enableHighLight, selProperty.enableHighPerformance, selProperty.highLightColor, selProperty.highLightWidth, selProperty.enableCaptureChildWindow);
|
|
2310
2326
|
}
|
|
2311
2327
|
else {
|
|
2312
2328
|
console.error('selectScreenCaptureTarget, sourceId or sourcename is undefined!');
|
|
@@ -3106,6 +3122,15 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
3106
3122
|
if (this.enableRenderFrame) {
|
|
3107
3123
|
this._onRenderFrame(id, type, width, height, timestamp, rotation, data);
|
|
3108
3124
|
}
|
|
3125
|
+
if (type === trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub) {
|
|
3126
|
+
const timestampRecord = Math.floor(timestamp / 5000);
|
|
3127
|
+
const key = `${id}-${type}-${timestampRecord}`;
|
|
3128
|
+
if (!this.userStreamFrameRecord.get(key)) {
|
|
3129
|
+
this.userStreamFrameRecord.clear(); // 只要来保留前一条数据,目前也只用来处理辅流
|
|
3130
|
+
this.userStreamFrameRecord.set(key, true);
|
|
3131
|
+
this._writeLog(`Render Local Screen Stream-JS:${id}_${type}_${timestamp}_${width}_${height}_${this.pixelformate}_${data.byteLength}_${Date.now()}`);
|
|
3132
|
+
}
|
|
3133
|
+
}
|
|
3109
3134
|
}, this.pixelformate);
|
|
3110
3135
|
}
|
|
3111
3136
|
addRemoteVideoRenderCallback(userid) {
|
package/liteav/trtc_define.d.ts
CHANGED
|
@@ -142,7 +142,29 @@ export declare class TRTCScreenCaptureSourceInfo {
|
|
|
142
142
|
constructor(type?: TRTCScreenCaptureSourceType, sourceId?: string, sourceName?: string, thumbBGRA?: TRTCImageBuffer, iconBGRA?: TRTCImageBuffer, isMinimizeWindow?: boolean);
|
|
143
143
|
}
|
|
144
144
|
/**
|
|
145
|
-
* 3.6
|
|
145
|
+
* 3.6 屏幕分享的进阶控制参数
|
|
146
|
+
*
|
|
147
|
+
* 该参数用于屏幕分享相关的接口 [selectScreenCaptureTarget]{@link TRTCCloud#selectScreenCaptureTarget},用于在指定分享目标时设定一系列进阶控制参数。
|
|
148
|
+
* 比如:是否采集鼠标、是否要采集子窗口、是否要在被分享目标周围绘制一个边框等。
|
|
149
|
+
*
|
|
150
|
+
* @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
|
|
151
|
+
* @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
|
|
152
|
+
* @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
|
|
153
|
+
* @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26。
|
|
154
|
+
* @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5px,您可以设置的最大值为 50。
|
|
155
|
+
* @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
|
|
156
|
+
*/
|
|
157
|
+
export declare class TRTCScreenCaptureProperty {
|
|
158
|
+
enableCaptureMouse: boolean;
|
|
159
|
+
enableHighLight: boolean;
|
|
160
|
+
enableHighPerformance: boolean;
|
|
161
|
+
highLightColor: number;
|
|
162
|
+
highLightWidth: number;
|
|
163
|
+
enableCaptureChildWindow: boolean;
|
|
164
|
+
constructor(enableCaptureMouse?: boolean, enableHighLight?: boolean, enableHighPerformance?: boolean, highLightColor?: number, highLightWidth?: number, enableCaptureChildWindow?: boolean);
|
|
165
|
+
}
|
|
166
|
+
/**
|
|
167
|
+
* 3.7 设备信息
|
|
146
168
|
*
|
|
147
169
|
* @param {String} deviceId - 设备PID,字符编码格式是UTF-8
|
|
148
170
|
* @param {String} deviceName - 设备名称,字符编码格式是UTF-8
|
|
@@ -154,7 +176,7 @@ export declare class TRTCDeviceInfo {
|
|
|
154
176
|
constructor(deviceId?: string, deviceName?: string);
|
|
155
177
|
}
|
|
156
178
|
/**
|
|
157
|
-
* 3.
|
|
179
|
+
* 3.8 视频帧数据
|
|
158
180
|
*
|
|
159
181
|
* @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
|
|
160
182
|
* @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
|
|
@@ -507,8 +529,7 @@ export declare class TRTCPublishCDNParam {
|
|
|
507
529
|
appId: number;
|
|
508
530
|
bizId: number;
|
|
509
531
|
url: null | string;
|
|
510
|
-
|
|
511
|
-
constructor(appId?: number, bizId?: number, url?: null | string, streamId?: string);
|
|
532
|
+
constructor(appId?: number, bizId?: number, url?: null | string);
|
|
512
533
|
}
|
|
513
534
|
/**
|
|
514
535
|
* 5.13 录音参数
|
package/liteav/trtc_define.js
CHANGED
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
*/
|
|
8
8
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
9
|
-
exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCTranscodingConfigMode = exports.TRTCMixUser = exports.Rect = exports.TRTCSpeedTestResult = exports.TRTCVolumeInfo = exports.TRTCQualityInfo = exports.TRTCNetworkQosParam = exports.TRTCRenderParams = exports.TRTCVideoEncParam = exports.TRTCParams = exports.TRTCWaterMarkSrcType = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCVideoFrame = exports.TRTCDeviceInfo = exports.TRTCScreenCaptureSourceInfo = exports.TRTCImageBuffer = exports.TRTCAudioQuality = exports.TRTCScreenCaptureSourceType = exports.TRTCAudioFrameFormat = exports.TRTCVideoQosPreference = exports.TRTCQosControlMode = exports.TRTCRoleType = exports.TRTCAppScene = exports.TRTCVideoMirrorType = exports.TRTCVideoBufferType = exports.TRTCVideoPixelFormat = exports.TRTCBeautyStyle = exports.TRTCVideoRotation = exports.TRTCVideoFillMode = exports.TRTCQuality = exports.TRTCVideoStreamType = exports.TRTCVideoResolutionMode = exports.TRTCVideoResolution = void 0;
|
|
9
|
+
exports.TRTCSwitchRoomParam = exports.AudioMusicParam = exports.TRTCStatistics = exports.TRTCRemoteStatistics = exports.TRTCLocalStatistics = exports.TRTCAudioEffectParam = exports.TRTCAudioRecordingParams = exports.TRTCPublishCDNParam = exports.TRTCTranscodingConfig = exports.TRTCTranscodingConfigMode = exports.TRTCMixUser = exports.Rect = exports.TRTCSpeedTestResult = exports.TRTCVolumeInfo = exports.TRTCQualityInfo = exports.TRTCNetworkQosParam = exports.TRTCRenderParams = exports.TRTCVideoEncParam = exports.TRTCParams = exports.TRTCWaterMarkSrcType = exports.TRTCDeviceType = exports.TRTCDeviceState = exports.TRTCLogLevel = exports.TRTCVideoFrame = exports.TRTCDeviceInfo = exports.TRTCScreenCaptureProperty = exports.TRTCScreenCaptureSourceInfo = exports.TRTCImageBuffer = exports.TRTCAudioQuality = exports.TRTCScreenCaptureSourceType = exports.TRTCAudioFrameFormat = exports.TRTCVideoQosPreference = exports.TRTCQosControlMode = exports.TRTCRoleType = exports.TRTCAppScene = exports.TRTCVideoMirrorType = exports.TRTCVideoBufferType = exports.TRTCVideoPixelFormat = exports.TRTCBeautyStyle = exports.TRTCVideoRotation = exports.TRTCVideoFillMode = exports.TRTCQuality = exports.TRTCVideoStreamType = exports.TRTCVideoResolutionMode = exports.TRTCVideoResolution = void 0;
|
|
10
10
|
/////////////////////////////////////////////////////////////////////////////////
|
|
11
11
|
//
|
|
12
12
|
// 【(一)视频相关枚举值定义】
|
|
@@ -539,7 +539,31 @@ class TRTCScreenCaptureSourceInfo {
|
|
|
539
539
|
exports.TRTCScreenCaptureSourceInfo = TRTCScreenCaptureSourceInfo;
|
|
540
540
|
;
|
|
541
541
|
/**
|
|
542
|
-
* 3.6
|
|
542
|
+
* 3.6 屏幕分享的进阶控制参数
|
|
543
|
+
*
|
|
544
|
+
* 该参数用于屏幕分享相关的接口 [selectScreenCaptureTarget]{@link TRTCCloud#selectScreenCaptureTarget},用于在指定分享目标时设定一系列进阶控制参数。
|
|
545
|
+
* 比如:是否采集鼠标、是否要采集子窗口、是否要在被分享目标周围绘制一个边框等。
|
|
546
|
+
*
|
|
547
|
+
* @param {Boolean} enableCaptureMouse - 是否采集目标内容的同时采集鼠标,默认为 true
|
|
548
|
+
* @param {Boolean} enableHighLight - 是否高亮正在共享的窗口(在被分享目标周围绘制一个边框),默认为 true。
|
|
549
|
+
* @param {Boolean} enableHighPerformance - 是否开启高性能模式(只会在分享屏幕时会生效),默认为 true。【特殊说明】开启后屏幕采集性能最佳,但会丧失抗遮挡能力,如果您同时开启 enableHighLight + enableHighPerformance,远端用户可以看到高亮的边框。
|
|
550
|
+
* @param {Number} highLightColor - 指定高亮边框的颜色,RGB 格式,传入 0 时代表采用默认颜色,默认颜色为 #8CBF26。
|
|
551
|
+
* @param {Number} highLightWidth - 指定高亮边框的宽度,传入0时采用默认描边宽度,默认宽度为 5px,您可以设置的最大值为 50。
|
|
552
|
+
* @param {Boolean} enableCaptureChildWindow - 窗口采集时是否采集子窗口(需要子窗口与被采集窗口具有 Owner 或 Popup 属性),默认为 false。
|
|
553
|
+
*/
|
|
554
|
+
class TRTCScreenCaptureProperty {
|
|
555
|
+
constructor(enableCaptureMouse = true, enableHighLight = true, enableHighPerformance = true, highLightColor = 0, highLightWidth = 0, enableCaptureChildWindow = false) {
|
|
556
|
+
this.enableCaptureMouse = enableCaptureMouse;
|
|
557
|
+
this.enableHighLight = enableHighLight;
|
|
558
|
+
this.enableHighPerformance = enableHighPerformance;
|
|
559
|
+
this.highLightColor = highLightColor;
|
|
560
|
+
this.highLightWidth = highLightWidth;
|
|
561
|
+
this.enableCaptureChildWindow = enableCaptureChildWindow;
|
|
562
|
+
}
|
|
563
|
+
}
|
|
564
|
+
exports.TRTCScreenCaptureProperty = TRTCScreenCaptureProperty;
|
|
565
|
+
/**
|
|
566
|
+
* 3.7 设备信息
|
|
543
567
|
*
|
|
544
568
|
* @param {String} deviceId - 设备PID,字符编码格式是UTF-8
|
|
545
569
|
* @param {String} deviceName - 设备名称,字符编码格式是UTF-8
|
|
@@ -554,7 +578,7 @@ class TRTCDeviceInfo {
|
|
|
554
578
|
exports.TRTCDeviceInfo = TRTCDeviceInfo;
|
|
555
579
|
;
|
|
556
580
|
/**
|
|
557
|
-
* 3.
|
|
581
|
+
* 3.8 视频帧数据
|
|
558
582
|
*
|
|
559
583
|
* @param {TRTCVideoPixelFormat} videoFormat - 视频帧的格式
|
|
560
584
|
* @param {TRTCVideoBufferType} bufferType - 视频数据结构类型
|
|
@@ -1067,11 +1091,10 @@ exports.TRTCTranscodingConfig = TRTCTranscodingConfig;
|
|
|
1067
1091
|
*
|
|
1068
1092
|
*/
|
|
1069
1093
|
class TRTCPublishCDNParam {
|
|
1070
|
-
constructor(appId = 0, bizId = 0, url = null
|
|
1094
|
+
constructor(appId = 0, bizId = 0, url = null) {
|
|
1071
1095
|
this.appId = appId;
|
|
1072
1096
|
this.bizId = bizId;
|
|
1073
1097
|
this.url = url;
|
|
1074
|
-
this.streamId = streamId;
|
|
1075
1098
|
}
|
|
1076
1099
|
}
|
|
1077
1100
|
exports.TRTCPublishCDNParam = TRTCPublishCDNParam;
|