Re: [webrtc-stats] WPT tests are wrong about when "outbound-rtp" and "inbound-rtp" stats appear (#619)

Fyi the official way to read (non-zero) RTP stats is to wait for RTP, [like this](https://jsfiddle.net/jib1/y0k2p3of/):
```js
  pc1.addTrack((await gUM({video:true})).getTracks()[0]);
  const {track} = await new Promise(r => pc2.ontrack = r);
  await new Promise(r => track.onunmute = r);
  const stats = await pc1.getStats();
  console.log(`${[...stats.values()].filter(({type}) => type == "outbound-rtp").length} outbound-rtp`);
```
But note that due to [crbug 1295295](https://crbug.com/1295295) this would still return stats early in Chrome. 🤷🏼‍♂️


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Tuesday, 8 February 2022 20:24:09 UTC