Store concrete ICE candidate for remote candidates. (#4458)

This commit is contained in:
Raja Subramanian
2026-04-17 13:14:47 +05:30
committed by GitHub
parent 2a04bc3ca8
commit dbf5cf6196
3 changed files with 65 additions and 101 deletions
+5 -5
View File
@@ -2331,7 +2331,7 @@ func connectionDetailsFields(infos []*types.ICEConnectionInfo) []any {
if c.Trickle {
cStr += "[trickle]"
}
cStr += " " + c.Local.String()
cStr += " " + c.Candidate.String()
candidates = append(candidates, cStr)
}
for _, c := range info.Remote {
@@ -2344,11 +2344,11 @@ func connectionDetailsFields(infos []*types.ICEConnectionInfo) []any {
if c.Trickle {
cStr += "[trickle]"
}
cStr += " " + fmt.Sprintf("%s %s %s:%d", c.Remote.NetworkType(), c.Remote.Type(), MaybeTruncateIP(c.Remote.Address()), c.Remote.Port())
if relatedAddress := c.Remote.RelatedAddress(); relatedAddress != nil {
relatedAddr := MaybeTruncateIP(relatedAddress.Address)
cStr += " " + fmt.Sprintf("%s %s %s:%d", c.Candidate.Protocol.String(), c.Candidate.Typ.String(), MaybeTruncateIP(c.Candidate.Address), c.Candidate.Port)
if relatedAddress := c.Candidate.RelatedAddress; relatedAddress != "" {
relatedAddr := MaybeTruncateIP(relatedAddress)
if relatedAddr != "" {
cStr += " " + fmt.Sprintf(" related %s:%d", relatedAddr, relatedAddress.Port)
cStr += " " + fmt.Sprintf(" related %s:%d", relatedAddr, c.Candidate.RelatedPort)
}
}
candidates = append(candidates, cStr)