trtc-electron-sdk 10.2.8-beta.0 → 10.2.8-beta.3

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 +15 -11
  2. package/package.json +1 -1
package/liteav/trtc.js CHANGED
@@ -3499,11 +3499,13 @@ class TRTCCloud extends events_1.EventEmitter {
3499
3499
  return;
3500
3500
  }
3501
3501
  this.rtcCloud.addLocalVideoRenderCallback((id, type, width, height, timestamp, rotation) => {
3502
- if (this.isScreenCapturing && this.screenCaptureStreamType === type) {
3503
- this._onRenderFrame(id, type, width, height, timestamp, rotation, screenVideoBuffer.buffer);
3504
- }
3505
- else {
3506
- this._onRenderFrame(id, type, width, height, timestamp, rotation, localVideoBuffer.buffer);
3502
+ if (this.enableRenderFrame) {
3503
+ if (this.isScreenCapturing && this.screenCaptureStreamType === type) {
3504
+ this._onRenderFrame(id, type, width, height, timestamp, rotation, screenVideoBuffer.buffer);
3505
+ }
3506
+ else {
3507
+ this._onRenderFrame(id, type, width, height, timestamp, rotation, localVideoBuffer.buffer);
3508
+ }
3507
3509
  }
3508
3510
  }, this.pixelformate);
3509
3511
  }
@@ -3525,12 +3527,14 @@ class TRTCCloud extends events_1.EventEmitter {
3525
3527
  return;
3526
3528
  }
3527
3529
  this.rtcCloud.addRemoteVideoRenderCallback(userId, (id, type, width, height, timestamp, rotation) => {
3528
- const videoBufferInfo = remoteVideoBufferMap.get(id);
3529
- if (videoBufferInfo && videoBufferInfo.streamType === type) {
3530
- this._onRenderFrame(id, type, width, height, timestamp, rotation, videoBufferInfo.buffer);
3531
- }
3532
- else {
3533
- this._onRenderFrame(id, type, width, height, timestamp, rotation, screenVideoBuffer.buffer);
3530
+ if (this.enableRenderFrame) {
3531
+ const videoBufferInfo = remoteVideoBufferMap.get(id);
3532
+ if (videoBufferInfo && videoBufferInfo.streamType === type) {
3533
+ this._onRenderFrame(id, type, width, height, timestamp, rotation, videoBufferInfo.buffer);
3534
+ }
3535
+ else {
3536
+ this._onRenderFrame(id, type, width, height, timestamp, rotation, screenVideoBuffer.buffer);
3537
+ }
3534
3538
  }
3535
3539
  }, this.pixelformate);
3536
3540
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "trtc-electron-sdk",
3
- "version": "10.2.8-beta.0",
3
+ "version": "10.2.8-beta.3",
4
4
  "description": "trtc electron sdk",
5
5
  "main": "./liteav/trtc.js",
6
6
  "types": "./liteav/trtc.d.ts",