> we can move the RTCRtpContributingSourceStats to be part of RTCAudioReceiverStats Not easily, because it's a one-to-many relationship. I.e. [receiver.getContributingSources](http://w3c.github.io/webrtc-pc/#dom-rtcrtpreceiver-getcontributingsources) returns a *sequence* of [RTCRtpContributingSource](http://w3c.github.io/webrtc-pc/#idl-def-rtcrtpcontributingsource)s, whereas [RTCRtpContributingSourceStats](https://w3c.github.io/webrtc-stats/#dom-rtcrtpcontributingsourcestats) covers *one* csrc. A one-to-many relationship. E.g. you'd do: ```js async function collectCsrcStats(receiver) const stats = await receiver.getStats(); return [...stats.values()].filter(({type}) => type == "csrc"); } ``` As @na-g mentions, this works in Firefox (assuming you have a server that emits csrcs). -- GitHub Notification of comment by jan-ivar Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/371#issuecomment-421144503 using your GitHub accountReceived on Thursday, 13 September 2018 20:36:23 UTC
This archive was generated by hypermail 2.4.0 : Saturday, 6 May 2023 21:19:45 UTC