make migrated node has higher candidate priority (#546)

This commit is contained in:
cnderrauber
2022-03-22 09:47:43 +08:00
committed by GitHub
parent cf63da2e64
commit 63d6b49668
2 changed files with 7 additions and 0 deletions
+1
View File
@@ -178,6 +178,7 @@ func (p *ParticipantImpl) sendIceCandidate(c *webrtc.ICECandidate, target liveki
// write candidate
p.params.Logger.Debugw("sending ice candidates",
"candidate", c.String(), "target", target)
ci.Candidate += fmt.Sprintf(" network-cost %d", p.networkCost)
trickle := ToProtoTrickle(ci)
trickle.Target = target
_ = p.writeMessage(&livekit.SignalResponse{