feross / simple-peer

📡 Simple WebRTC video, voice, and data channels
MIT License
7.41k stars 970 forks source link

Let's solve the recent getStats() instability #122

Closed feross closed 7 years ago

feross commented 7 years ago

I've been playing with the code that decides which version of RTCPeerConnection.prototype.getStats gets called to add support for , and it's unfortunately pretty finicky.

There are at least 3 implementations that I know of:

It's not easy to feature detect which version is available, so we have to resort to user agent sniffing.

I propose that we:

feross commented 7 years ago

First PR, review please: https://github.com/feross/simple-peer/pull/123

feross commented 7 years ago

Okay, this is all fixed now! Lots of good stuff is in here now, including support for the new spec-compliant getStats() report format.

This new format is available in Chrome today if you enable "Experimental Web Platform Features". It will ship in Chrome 58 and simple-peer will be ready for it. I'm not sure when Firefox is shipping a spec-compliant format, but this should work for that too.

feross commented 7 years ago

6.2.0