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.
Files changed (2) hide show
  1. package/liteav/trtc.js +2 -6
  2. 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
- // 已经在分享中,切换分享流类型,先删除传给C++层之前的 Buffer,再重新添加 Buffer
2672
- this.rtcCloud.setSubVideoBuffer('', screenVideoBuffer.buffer, screenVideoBuffer.streamType, 0, 0, screenVideoBuffer.pixelFormat);
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) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "10.2.8-beta.3",
3
+ "version": "10.2.8-beta.4",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",