Display both pairs on selected candidate pair change (#3133)
* Display both pairs on selected canddiate pair change * disable ICE lite for Firefox
This commit is contained in:
+11
-3
@@ -293,7 +293,11 @@ func newPeerConnection(params TransportParams, onBandwidthEstimator func(estimat
|
|||||||
//
|
//
|
||||||
se.DisableSRTPReplayProtection(true)
|
se.DisableSRTPReplayProtection(true)
|
||||||
se.DisableSRTCPReplayProtection(true)
|
se.DisableSRTCPReplayProtection(true)
|
||||||
if !params.ProtocolVersion.SupportsICELite() {
|
if !params.ProtocolVersion.SupportsICELite() || !params.ClientInfo.SupportPrflxOverRelay() {
|
||||||
|
// if client don't support prflx over relay which is only Firefox, disable ICE Lite to ensure that
|
||||||
|
// dropping remote ICE candidates does not get enabled. Firefox does aggressive nomination and
|
||||||
|
// dropping remote ICE candidates means server would accept all switches and it could end up with
|
||||||
|
// the lower priority candidate. As Firefox does not support migration, ICE Lite can be disabled.
|
||||||
se.SetLite(false)
|
se.SetLite(false)
|
||||||
}
|
}
|
||||||
se.SetDTLSRetransmissionInterval(dtlsRetransmissionInterval)
|
se.SetDTLSRetransmissionInterval(dtlsRetransmissionInterval)
|
||||||
@@ -473,8 +477,12 @@ func (t *PCTransport) createPeerConnection() error {
|
|||||||
t.pc.SCTP().Transport().ICETransport().OnSelectedCandidatePairChange(func(pair *webrtc.ICECandidatePair) {
|
t.pc.SCTP().Transport().ICETransport().OnSelectedCandidatePairChange(func(pair *webrtc.ICECandidatePair) {
|
||||||
t.params.Logger.Debugw("selected ICE candidate pair changed", "pair", wrappedICECandidatePairLogger{pair})
|
t.params.Logger.Debugw("selected ICE candidate pair changed", "pair", wrappedICECandidatePairLogger{pair})
|
||||||
t.connectionDetails.SetSelectedPair(pair)
|
t.connectionDetails.SetSelectedPair(pair)
|
||||||
if t.selectedPair.Load() != nil {
|
existingPair := t.selectedPair.Load()
|
||||||
t.params.Logger.Infow("ice reconnected or switched pair", "pair", wrappedICECandidatePairLogger{pair})
|
if existingPair != nil {
|
||||||
|
t.params.Logger.Infow(
|
||||||
|
"ice reconnected or switched pair",
|
||||||
|
"existingPair", wrappedICECandidatePairLogger{existingPair},
|
||||||
|
"newPair", wrappedICECandidatePairLogger{pair})
|
||||||
}
|
}
|
||||||
t.selectedPair.Store(pair)
|
t.selectedPair.Store(pair)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user