fippo / rtcstats

MIT License
128 stars 41 forks source link

Clarify expected behavior in README #88

Open David-dp- opened 5 years ago

David-dp- commented 5 years ago

After reading the README, it's not clear to me where the stats will appear...in the browser console, I guessed. To test this, I did:

  1. Downloaded rtcstats.js
  2. Uploaded it to the same folder where my verto js lib files are
  3. Made this the first script execution in my test page:
  4. Made a test call and monitored the browser console

The call went fine (in Chrome72/incognito/Win10), but I didn't see anything new once the peer must have gotten to ice connection state "completed", nor after hangup.

I would expect that I could pass a callback, probably as a listener to iceconnectionstatechange, and that I could inspect the collected, periodic stats that way. If you would explain a bit what to expect, I'll submit a PR for the README to help clarify. Thanks.

fippo commented 5 years ago

no, they will be sent to an instance of https://github.com/opentok/rtcstats-server via websocket.

https://github.com/opentok/rtcstats#require is the more common way to use this nowadays, the other one should probably be removed from the README