Open murillo128 opened 4 years ago
The language is a catch-all to ensure all referenced stats objects are included, so we don't have to update this in two specs.
We could probably update "referenced" to "referenced", except that section is non-normative for some reason.
I think we should move the filtering algorithm to the stats doc, that way we can explicitly specify which stats are returned and avoid updating two specs.
A problem with an explicit list in webrtc-stats is that not all of webrtc-stats is Mandatory to Implement in WebRTC 1.0. So the total list will vary based on which stats above that baseline are implemented. A rule seems more flexible than a list here (for every stat above that baseline, be sure to include everything it references).
The invariant sought is for every xxxId
key encountered, stats.get(stat.xxxId)
must succeed.
That seems like a referential integrity test we could do from webrtc-pc even without domain knowledge of individual stats.
Form a developer point of view it is unfortunate to have a different set of stats in each browser, but it is what it is.
Having a rule at least would allow know what to look for, i think that the referenced stat id would work
When filtering by sender or receiver, the stats selection algorithm is as follows:
but in no place it is defined which are
the stats objects referenced directly or indirectly
.I understand that the intention was to leave it open so the webrtc stats define those stats, but currently it is defined nowhere which would lead to not deterministic implementation on browsers.