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.
- package/liteav/trtc.js +15 -11
- 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.
|
|
3499
|
-
this.
|
|
3500
|
-
|
|
3501
|
-
|
|
3502
|
-
|
|
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
|
-
|
|
3525
|
-
|
|
3526
|
-
|
|
3527
|
-
|
|
3528
|
-
|
|
3529
|
-
|
|
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
|
}
|