switch to tls if tcp ice dose not work well (#1458)

* switch to tls if tcp ice don't work well

* ignore tcp quality too bad
This commit is contained in:
cnderrauber
2023-02-23 14:07:50 +08:00
committed by GitHub
parent cd0359c898
commit dbb2cdf2b6
2 changed files with 65 additions and 14 deletions
+2
View File
@@ -698,6 +698,8 @@ func (t *TransportManager) onMediaLossUpdate(loss uint8) {
func (t *TransportManager) UpdateSignalingRTT(rtt uint32) {
t.signalingRTT = rtt
t.publisher.SetSignalingRTT(rtt)
t.subscriber.SetSignalingRTT(rtt)
// TODO: considering using tcp rtt to calculate ice connection cost, if ice connection can't be established
// within 5 * tcp rtt(at least 5s), means udp traffic might be block/dropped, switch to tcp.