trtc-electron-sdk 10.3.8-beta.3 → 10.3.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 +4 -0
  2. package/package.json +1 -1
package/liteav/trtc.js CHANGED
@@ -2601,6 +2601,10 @@ class TRTCCloud extends events_1.EventEmitter {
2601
2601
  console.error('trtc:startScreenCapture, params is not instanceof TRTCVideoEncParam!');
2602
2602
  return;
2603
2603
  }
2604
+ if (this.isScreenCapturing && this.screenCaptureStreamType !== type && screenVideoBuffer.buffer) {
2605
+ // 已经在分享中,切换分享流类型,停止当前正在进行的分享
2606
+ this.stopScreenCapture();
2607
+ }
2604
2608
  this.screenCaptureStreamType = type;
2605
2609
  if (view !== undefined) {
2606
2610
  if (view !== null) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "10.3.8-beta.3",
3
+ "version": "10.3.8-beta.4",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",