trtc-electron-sdk 10.2.8-beta.3 → 10.2.8-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/trtc.js +2 -6
- package/package.json +1 -1
package/liteav/trtc.js
CHANGED
|
@@ -2659,7 +2659,6 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2659
2659
|
* @param {TRTCVideoEncParam} params 屏幕分享的画面编码参数,可以设置为 null,表示让 SDK 选择最佳的编码参数(分辨率、码率等)。即使在调用 startScreenCapture 时设置 type=TRTCVideoStreamTypeBig,依然可以使用此接口更新屏幕分享的编码参数。
|
|
2660
2660
|
*/
|
|
2661
2661
|
startScreenCapture(view = null, type = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub, params = null) {
|
|
2662
|
-
console.debug('trtc:startScreenCapture:', view, type, params);
|
|
2663
2662
|
if ((type !== trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub && type !== trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeBig)) {
|
|
2664
2663
|
type = trtc_define_1.TRTCVideoStreamType.TRTCVideoStreamTypeSub;
|
|
2665
2664
|
}
|
|
@@ -2668,11 +2667,8 @@ class TRTCCloud extends events_1.EventEmitter {
|
|
|
2668
2667
|
return;
|
|
2669
2668
|
}
|
|
2670
2669
|
if (this.isScreenCapturing && this.screenCaptureStreamType !== type && screenVideoBuffer.buffer) {
|
|
2671
|
-
//
|
|
2672
|
-
this.
|
|
2673
|
-
screenVideoBuffer.streamType = type;
|
|
2674
|
-
this.rtcCloud.setSubVideoBuffer('', screenVideoBuffer.buffer, screenVideoBuffer.streamType, screenVideoBuffer.width, screenVideoBuffer.height, screenVideoBuffer.pixelFormat);
|
|
2675
|
-
console.debug('trtc:startScreenCapture re-alloc add screenVideoBuffer', screenVideoBuffer);
|
|
2670
|
+
// 已经在分享中,切换分享流类型,停止当前正在进行的分享
|
|
2671
|
+
this.stopScreenCapture();
|
|
2676
2672
|
}
|
|
2677
2673
|
this.screenCaptureStreamType = type;
|
|
2678
2674
|
if (view !== undefined) {
|