Browse Source

fix(JingleSessionPC) fix "echo" on mobile

Fix having duplicated audio due to the JVB connection being re-activated
once the sender constraints change.
dev1
Saúl Ibarra Corretgé 3 years ago
parent
commit
cb3b0db30c
1 changed files with 3 additions and 2 deletions
  1. 3
    2
      modules/xmpp/JingleSessionPC.js

+ 3
- 2
modules/xmpp/JingleSessionPC.js View File

@@ -1517,9 +1517,10 @@ export default class JingleSessionPC extends JingleSession {
1517 1517
             // RN doesn't support RTCRtpSenders yet, aggresive layer suspension on RN is implemented
1518 1518
             // by changing the media direction in the SDP. This is applicable to jvb sessions only.
1519 1519
             if (!this.isP2P && browser.isReactNative() && typeof maxFrameHeight !== 'undefined') {
1520
-                const videoActive = maxFrameHeight > 0;
1520
+                const audioActive = this.peerconnection.audioTransferActive;
1521
+                const videoActive = this.peerconnection.videoTransferActive && maxFrameHeight > 0;
1521 1522
 
1522
-                return this.setMediaTransferActive(true, videoActive);
1523
+                return this.setMediaTransferActive(audioActive, videoActive);
1523 1524
             }
1524 1525
 
1525 1526
             const jitsiLocalTrack = sourceName

Loading…
Cancel
Save