webrtc-stats
webrtc-stats copied to clipboard
guidelines for getStats() results caching/throttling are a bit vague
https://w3c.github.io/webrtc-stats/#guidelines-for-getstats-results-caching-throttling says | When the state of the RTCPeerConnection visibly changes [clear the cache]
This doesn't define what "visibly changes" means. The onicecandidate or addIceCandidate methods will make new objects (of type local-candidate and remote-candidate) show up (which is assertable in a test).
The icegatheringstatechange event does not change the objects (I think) so should not invalidate. Maybe we should add a "maybe flush the cache" to descriptions like https://w3c.github.io/webrtc-pc/#dom-peerconnection-addicecandidate ?