From a8e3a5748902c26ca9cf2ffcd078b2cec16e3216 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sa=C3=BAl=20Ibarra=20Corretg=C3=A9?= Date: Thu, 24 Feb 2022 16:48:12 +0100 Subject: [PATCH] fix(rn,JingleSessionPC) remove aggressive layer suspension in RN It's possible we get sender constraint messages while operations to change the direction in the JVB session are in progress so we currently have no predictable way to properly suspend video without races. Since this will be solved when we move to transceivers, this is a compromise we are making. --- modules/xmpp/JingleSessionPC.js | 9 --------- 1 file changed, 9 deletions(-) diff --git a/modules/xmpp/JingleSessionPC.js b/modules/xmpp/JingleSessionPC.js index 1e50e3a7bc..35feb6734e 100644 --- a/modules/xmpp/JingleSessionPC.js +++ b/modules/xmpp/JingleSessionPC.js @@ -1514,15 +1514,6 @@ export default class JingleSessionPC extends JingleSession { if (this._assertNotEnded()) { logger.info(`${this} setSenderVideoConstraint: ${maxFrameHeight}, sourceName: ${sourceName}`); - // RN doesn't support RTCRtpSenders yet, aggresive layer suspension on RN is implemented - // by changing the media direction in the SDP. This is applicable to jvb sessions only. - if (!this.isP2P && browser.isReactNative() && typeof maxFrameHeight !== 'undefined') { - const audioActive = this.peerconnection.audioTransferActive; - const videoActive = this.peerconnection.videoTransferActive && maxFrameHeight > 0; - - return this.setMediaTransferActive(audioActive, videoActive); - } - const jitsiLocalTrack = sourceName ? this.rtc.getLocalVideoTracks().find(track => track.getSourceName() === sourceName) : this.rtc.getLocalVideoTrack();