trtc-electron-sdk 10.3.401 → 10.3.402

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