Skip to content

Commit

Permalink
fix(TPC) Do not force renegotiations for p2p.
Browse files Browse the repository at this point in the history
Chrome doesn't render media when the SSRC is added back to the m-line after removing it because of source-remove->source-add from peer. Avoid renegotiations so that these source removes and adds are not sent to the peer after the track is replaced.
  • Loading branch information
jallamsetty1 committed Mar 1, 2022
1 parent d91581a commit 6ddc054
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions modules/RTC/TraceablePeerConnection.js
Original file line number Diff line number Diff line change
Expand Up @@ -1980,8 +1980,8 @@ TraceablePeerConnection.prototype.replaceTrack = function(oldTrack, newTrack) {
? Promise.resolve()
: this.tpcUtils.setEncodings(newTrack);

// Renegotiate only in the case of P2P. We rely on 'negotiationeeded' to be fired for JVB.
return configureEncodingsPromise.then(() => this.isP2P || negotiationNeeded);
// Force renegotiation only when the source is added for the first time.
return configureEncodingsPromise.then(() => negotiationNeeded);
});
}

Expand Down

0 comments on commit 6ddc054

Please sign in to comment.