W3C home > Mailing lists > Public > public-webrtc-logs@w3.org > January 2018

Re: [webrtc-stats] Rename sender/receiver/track stats

From: jan-ivar via GitHub <sysbot+gh@w3.org>
Date: Thu, 18 Jan 2018 00:25:33 +0000
To: public-webrtc-logs@w3.org
Message-ID: <issue_comment.created-358495774-1516235132-sysbot+gh@w3.org>
@henbos Yes this was my point in the [slide](https://docs.google.com/presentation/d/1o-o5jZBLw3Py1OuenzWDkxDG6NigSmLHvGw5KemKWLw/edit#slide=id.g2d42e878ad_0_31) we didn't get to at the interim. It's not entirely trivial though:

```js
let senderStat = [...(await sender.getStats()).values()].find(s => s.type == “sender”);
let oldTracks = [...sender.getCompletedStats().values()].filter(s => s.type == “track”);

trackFramesSent = oldTracks.reduce((n, old) => n - old.framesSent, senderStat.framesSent);
```


-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at https://github.com/w3c/webrtc-stats/issues/298#issuecomment-358495774 using your GitHub account
Received on Thursday, 18 January 2018 00:26:06 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:21:58 UTC