Re: [webrtc-stats] What is the lifetime of datachannel stats? (#805)

> https://jsfiddle.net/fippo/gLs015hm/4/ makes it more obvious.

Wow that shows all the browsers returning `"data-channel"` stats objects _without_ a `.dataChannelIdentifier` member initially. So readers have to contend with partially filled in dictionaries (`undefined`), `null` and `0`. Not great.

> The problem here is that data channel ids are assigned odd/even depending on the DTLS role (see DCEP) which might change if there is an ICE role conflict. It is likely ok to expose after negotiation at least when a=setup is used.

Let's align on exposing after negotiation then (going back to `"stable"`). This would align with https://github.com/w3c/webrtc-stats/pull/802 and be more consistent.

This would also let us move counting to the [underlying data transport](https://w3c.github.io/webrtc-pc/#dfn-data-transport), which would make it simpler to account for data channel activity in workers.

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/805#issuecomment-3162026930 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Thursday, 7 August 2025 00:31:31 UTC