|
|
@@ -869,6 +869,21 @@ JitsiConference.prototype.onCallEnded
|
|
869
|
869
|
if (this.statistics) {
|
|
870
|
870
|
this.statistics.stopRemoteStats();
|
|
871
|
871
|
}
|
|
|
872
|
+ // PeerConnection has been closed which means that SSRCs stored in
|
|
|
873
|
+ // JitsiLocalTrack will not match those assigned by the old PeerConnection
|
|
|
874
|
+ // and SSRC replacement logic will not work as expected.
|
|
|
875
|
+ // We want to re-register 'ssrcHandler' of our local tracks, so that they
|
|
|
876
|
+ // will learn what their SSRC from the new PeerConnection which will be
|
|
|
877
|
+ // created on incoming call event.
|
|
|
878
|
+ var self = this;
|
|
|
879
|
+ this.rtc.localTracks.forEach(function(localTrack) {
|
|
|
880
|
+ // Reset SSRC as it will no longer be valid
|
|
|
881
|
+ localTrack._setSSRC(null);
|
|
|
882
|
+ // Bind the handler to fetch new SSRC, it will un register itself once
|
|
|
883
|
+ // it reads the values
|
|
|
884
|
+ self.room.addListener(
|
|
|
885
|
+ XMPPEvents.SENDRECV_STREAMS_CHANGED, localTrack.ssrcHandler);
|
|
|
886
|
+ });
|
|
872
|
887
|
};
|
|
873
|
888
|
|
|
874
|
889
|
|