Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose detailed connection info with ICEConnectionDetails #2287

Merged
merged 5 commits into from
Dec 3, 2023

Conversation

davidzhao
Copy link
Member

No description provided.

Filtered bool
}

type ICEConnectionDetails struct {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

combining all ICE details into a new data type

return p.TransportManager.GetICEConnectionDetails()
}

func (p *ParticipantImpl) HasConnected() bool {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

adding a new interface method. useful to know if Participant was ever successful

pkg/rtc/participant.go Outdated Show resolved Hide resolved
cds := participant.GetICEConnectionDetails()
for _, cd := range cds {
if cd.Type != types.ICEConnectionTypeUnknown {
meta.ConnectionType = string(cd.Type)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would be good to have both publisher and subscriber details in analytics at some point.

@@ -1416,3 +1426,39 @@ func BroadcastDataPacketForRoom(r types.Room, source types.LocalParticipant, dp
}
})
}

func connectionDetailsFields(cds []*types.ICEConnectionDetails) []interface{} {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be types/ice.go?

}
}

func IsCandidateEqualTo(c1, c2 *webrtc.ICECandidate) bool {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These looks like local methods. Can these be lower case isICE...?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking they are useful to others that are comparing candidates. but will make them local for now until we need it elsewhere.

@davidzhao davidzhao merged commit 37e1864 into master Dec 3, 2023
2 checks passed
@davidzhao davidzhao deleted the conn-details branch December 3, 2023 18:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants