RTP stats objects, of type "outbound-rtp" or "inbound-rtp" in this case, represents a WebRTC stream. The identifier of this stream is the SSRC (a number). We should collect stats for streams that "exist", but implementations and spec has disagreed on when the stream should exist: if the SSRC information is conveyed via SDP, does the stream still exist before packets are sent or received?
We are trying to reduce risk of interop by having browsers align. There is a small risk of backwards-compat when the lifetime logic is update, however considering web apps are already dealing with Chrome's "too early" logic and Firefox's "too late" logic, it seems that web apps should be well prepared for updating them to being created at a point in time that is in-between these two extremes.
Contact emailshttps://w3c.github.io/webrtc-stats/#the-rtp-statistics-hierarchy
SummaryRTP stats objects, of type "outbound-rtp" or "inbound-rtp" in this case, represents a WebRTC stream. The identifier of this stream is the SSRC (a number). We should collect stats for streams that "exist", but implementations and spec has disagreed on when the stream should exist: if the SSRC information is conveyed via SDP, does the stream still exist before packets are sent or received?
The fact that SSRCs can be signalled in SDP is only done for backwards compatibility reasons
, yet Chromium-based browsers currently create the "inbound-rtp" stats object if the SSRC is signalled in the SDP, which means you can end up with subtly different behavior depending on which endpoint you are setting up a WebRTC call with (if they include SSRCs or not).
What the spec says to do here, which is what Firefox has already implemented, is to delay the creation of the "inbound-rtp" stats object until the first packet is received. This is future-proof, because the packet contains the SSRC information and will always work, while the current behavior can result in "early" creation depending on SSRC signalling.
- We want Chromium to align with Firefox and spec behavior here.
Next up is when to create "outbound-rtp" stats objects. In this case the SSRCs are configured by the local sender and are known whether or not the SSRC information is put in the SDP, so creating them "early" is also future-proof. In this case, we want the stats objects to be created BEFORE packets are sent, because they are needed to know which encoding has which SSRC, see slides for nerdy details.
The spec was recently updated to reflect that "outbound-rtp" stats objects should be created before packets are sent, but not until the SDP negotiation has completed.- Chromium is slightly too early here, creating them before O/A has completed, but is almost spec-compliant.- Firefox creates them too late (after first packet is sent which is what the spec previously said). They will also need to update their behavior.
Blink componentN/A
Risks
Interoperability and CompatibilityWe are trying to reduce risk of interop by having browsers align. There is a small risk of backwards-compat when the lifetime logic is update, however considering web apps are already dealing with Chrome's "too early" logic and Firefox's "too late" logic, it seems that web apps should be well prepared for updating them to being created at a point in time that is in-between these two extremes.
Gecko: https://github.com/mozilla/standards-positions/issues/1202
WebKit: https://github.com/WebKit/standards-positions/issues/478Web developers: No signals, except for one vocal member of our community who would prefer to see everyone align on Chrome's current behavior, but we are unlikely to get consensus on that.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, ChromeOS, Android, and Android WebView)?Yes this is fully testable here: https://source.chromium.org/chromium/chromium/src/+/main:third_party/blink/web_tests/external/wpt/webrtc/rtp-stats-lifetime.https.html
Anticipated spec changes
None
Link to entry on the Chrome Platform Status
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3e542d12-7e1b-45e4-9129-bace5b1b9840n%40chromium.org.
WRT "no SSRC signalling": Of course it's allowed to include RFC 5576 style signalling if you want to.But RFC 8829 (JSEP) has only this reference to 5576:
- Any "a=ssrc" attributes MUST be parsed as specified in [RFC5576], Section 4.1, and their values stored.¶
It never says to generate an a=ssrc attribute.
This means that a) we can't depend on JSEP-compatible browsers to generate SSRC attributes, and b) we can't write Web Platform tests that check for the result of SSRC attributes, since none are specified.
The various WGs have discussed SSRC signaling many times, and always came down on rejecting it. I even had an internet-draft (draft-alvestrand-mmusic-simulcast-ssrc-01) specifying a way to use it in order to increase backwards compatibility, but the WGs declined to pursue that effort, and I let the draft expire.Hope that this clarifies a bit.HaraldOn Fri, Mar 28, 2025 at 4:16 PM Henrik Boström <hb...@chromium.org> wrote:Hello Philipp. Philipp is the "vocal member of our community" that I referenced earlier as you may have guessed.Regarding "for what gain?", I think it is good that all browsers align on behavior to avoid edge case surprises. That is good in and of itself. Considering the latest spec changes incorporate the use case of obtaining SSRCs prior to sending, I fail to see any use case that is hurt my making the browsers align.
Regarding code links that filtering is happening in Firefox: when an object is created in these discussions refers to the point of time that it becomes observable in JavaScript for the first time, so whether Firefox implements this via filtering on top of the libwebrtc or through other means is an implementation detail that is not observable and is thus irrelevant to our discussions.Harald may have more information about the rationale for why we don't want to signal SSRCs in the SDP, but it would be good to decouple that question from the question of when RTP stats objects should be created considering they contain 0 useful information during the period of time that we want them not to be exposed to JavaScript.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
That's correct, but getStats() does not really contain any useful information during the period of time where we want to not expose it to the web anymore. All counters in the objects are 0s because they haven't "been used yet".
So the delta is about whether you have access to the SSRC value or not. The use case that is being affected by this change is "I depend on SSRCs being signalled in the SDP but I don't want to parse the SDP for SSRC information and I need to know them before the first packet is received". So it's a dependency on the UA implementing an RFC that is not mandated to implement, and a use case where the app can work around it by parsing the SSRC values themselves.
Use cases that don't depend on this RFC are largely unaffected - even if SSRCs are not exposed in the SDP we will continue to expose send-side SSRCs in getStats early, and receive-side SSRCs were never exposed early in this case to begin with so that's a NO-OP change.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+unsubscribe@chromium.org.
LGTM2 (with flag)
/Daniel
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a7146450-2c5d-45f7-b62f-040f7c4921e3n%40chromium.org.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/c8b53bd3-6fed-466e-be5d-d53bc31c8dafn%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/3e542d12-7e1b-45e4-9129-bace5b1b9840n%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/a7146450-2c5d-45f7-b62f-040f7c4921e3n%40chromium.org.
--
You received this message because you are subscribed to the Google Groups "blink-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blink-dev+...@chromium.org.
To view this discussion visit https://groups.google.com/a/chromium.org/d/msgid/blink-dev/fa61ffef-0525-4117-a0da-b91d414d89c2%40sarasas.se.