diff --git a/.changeset/libwebrtc_network_type_stat.md b/.changeset/libwebrtc_network_type_stat.md new file mode 100644 index 000000000..b1806cfae --- /dev/null +++ b/.changeset/libwebrtc_network_type_stat.md @@ -0,0 +1,12 @@ +--- +libwebrtc: minor +livekit: patch +livekit-ffi: patch +--- + +# Expose network_type on IceCandidateStats + +Chromium's local `RTCIceCandidateStats` carries a non-standard `networkType` field (WiFi, +cellular, ethernet, etc.), but `IceCandidateStats` had no place to put it, so it was silently +dropped during `get_stats()` deserialization. Adds `network_type: Option` to the struct; +non-breaking since it already derives `#[serde(default)]`. diff --git a/libwebrtc/src/stats.rs b/libwebrtc/src/stats.rs index a6da73449..6279021d6 100644 --- a/libwebrtc/src/stats.rs +++ b/libwebrtc/src/stats.rs @@ -601,6 +601,9 @@ pub mod dictionaries { pub related_port: i32, pub username_fragment: String, pub tcp_type: Option, + /// Chromium's non-standard `RTCIceCandidateStats.networkType` (WiFi, cellular, ethernet, + /// etc.), reported only for local candidates. + pub network_type: Option, } #[derive(Debug, Default, Clone, Deserialize)]