W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > May 2019

[webrtc-stats] RTCStats.id should not be "predictable" (#437)

From: henbos via GitHub <sysbot+gh@w3.org>
Date: Tue, 21 May 2019 12:00:13 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issues.opened-446578654-1558440012-sysbot+gh@w3.org>
henbos has just created a new issue for https://github.com/w3c/webrtc-stats:

== RTCStats.id should not be "predictable" ==
This is a request to change webrtc-pc, but filed the issue here to grab the attention of stats editors.

[Current definition](https://w3c.github.io/webrtc-pc/#dom-rtcstats-id):
> A unique id that is associated with the object that was inspected to produce this RTCStats object. Two RTCStats objects, extracted from two different RTCStatsReport objects, MUST have the same id if they were produced by inspecting the same underlying object. User agents are free to pick any format for the id as long as it meets the requirements above.

Based on being free to pick any format, Chrome's implementation generates IDs that follow patterns that are "easy" to predict. For example, outbound-rtp have IDs "RTCOutboundRTP[Audio/Video]Stream_[ssrc]". Having a predictable patterns makes it easier for implementations to ensure the ID is the same between multiple calls to getStats() and makes it easy to generate one dictionary with an ID reference to another dictionary, before that dictionary has been generated.

The downside to implementations being allowed to use predictable IDs is that applications may take advantage of the predictability and start depending on non-standard ID formats that only work in some browser implementations and versions.

Should we say that ID has to be seemingly random? I imagine ID should look similar to track and stream IDs. What does Firefox do, @jan-ivar ?

Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/437 using your GitHub account
Received on Tuesday, 21 May 2019 12:00:15 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:22:23 UTC