Contact emails
h...@chromium.org, h...@chromium.org

ExplainerNone

Specification
https://w3c.github.io/webrtc-stats/#the-rtp-statistics-hierarchy

Summary

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?

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 
<https://docs.google.com/presentation/d/1XOyWSPufsvDpK18GXZvq_j1rF3gs34QvPlOWWyB0CjU/edit?slide=id.g3426753bdd0_1_17#slide=id.g3426753bdd0_1_17>
 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 component
Blink>WebRTC>PeerConnection 
<https://issues.chromium.org/issues?q=customfield1222907:%22Blink%3EWebRTC%3EPeerConnection%22>

TAG review
N/A

Risks

Interoperability and Compatibility

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.

*Gecko*: https://github.com/mozilla/standards-positions/issues/1202
*WebKit*: https://github.com/WebKit/standards-positions/issues/478

*Web 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

Is this feature fully tested by web-platform-tests 
<https://chromium.googlesource.com/chromium/src/+/main/docs/testing/web_platform_tests.md>
?
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
https://chromestatus.com/feature/4580748730040320?gate=5113159150731264

-- 
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+unsubscr...@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.

Reply via email to