- From: Jan-Ivar Bruaroey via GitHub <sysbot+gh@w3.org>
- Date: Tue, 08 Feb 2022 20:24:07 +0000
- To: public-webrtc-logs@w3.org
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