Skip to content

Commit

Permalink
fix(rn,JingleSessionPC) remove aggressive layer suspension in RN
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
saghul committed Feb 24, 2022
1 parent c6b79dc commit a8e3a57
Showing 1 changed file with 0 additions and 9 deletions.
9 changes: 0 additions & 9 deletions modules/xmpp/JingleSessionPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit a8e3a57

Please sign in to comment.