Re: [webrtc-stats] RTCPeerConnectionStats appear redundant. Remove?

> such as counting outgoing bytes on a datachannel by instrumenting every send() call

That won't tell you how many bytes were actually sent, or whether the message was fully delivered, since `send()` returns immediately.

I think we should focus on things the JS app cannot easily measure, since we have almost [300](https://webrtc-stats.callstats.io/verify/) stats to implement.

No JS app needs the browser to tell it how often it called `pc.createDataChannel()`, or how often events fired. Here:
```js
pc.addEventListener('datachannel' () => dataChannelsAccepted++);

function createDataChannel(...args) {
  const channel = pc.createDataChannel(...args);
  dataChannelsRequested++;
  channel.addEventListener('open', () => dataChannelsOpened++);
  channel.addEventListener('closed', () => dataChannelsClosed++);
}
```
We have lots of precedent for axing things that aren't necessary.


-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/382#issuecomment-439497226 using your GitHub account

Received on Friday, 16 November 2018 19:15:30 UTC