Skip to content

libwebrtc: expose network_type on IceCandidateStats - #1363

Open
trypsynth wants to merge 3 commits into
livekit:mainfrom
trypsynth:add-network-type-stat
Open

libwebrtc: expose network_type on IceCandidateStats#1363
trypsynth wants to merge 3 commits into
livekit:mainfrom
trypsynth:add-network-type-stat

Conversation

@trypsynth

Copy link
Copy Markdown

Summary

  • Chromium's local RTCIceCandidateStats carries a non-standard networkType field (WiFi, cellular, ethernet, etc.), but IceCandidateStats has no place to put it, so it's silently dropped during get_stats() deserialization.
  • Adds pub network_type: Option<String> to IceCandidateStats in libwebrtc/src/stats.rs. The struct already derives #[serde(rename_all = "camelCase")] #[serde(default)], so this maps to the existing networkType JSON key and is non-breaking for any RTCIceCandidateStats that doesn't emit it (server-reflexive/relay/remote candidates, or non-Chromium backends).

Test plan

  • cargo check -p libwebrtc

@trypsynth
trypsynth requested a review from cloudwebrtc as a code owner August 26, 2026 14:21
@CLAassistant

CLAassistant commented Aug 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

devin-ai-integration[bot]

This comment was marked as resolved.

@cloudwebrtc cloudwebrtc left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

lgtm!

@cloudwebrtc

Copy link
Copy Markdown
Contributor

@trypsynth cloud you please add the .changeset to this PR?

@trypsynth
trypsynth requested a review from ladvoc as a code owner August 27, 2026 16:12
@trypsynth

Copy link
Copy Markdown
Author

@cloudwebrtc Done

Expose network_type on IceCandidateStats for libwebrtc, livekit, and livekit-ffi.
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.

3 participants