This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
From Jan-Ivar Bruarøy: I'd like to propose a change to getStats so that calling it on a closed PeerConnection does not throw, but instead gives you the stats at the time the PeerConnection closed. Use-case: A webpage wants stats about the call that just terminated from the other side - e.g. how many frames dropped? In [1] remove step 1: > 1. If the RTCPeerConnection object's RTCPeerConnection signalingState is closed, throw an InvalidStateError exception. And edit step 5 (which would now be 4): > 4. Start gathering the stats indicated by selectorArg. In case selectorArg is null, stats MUST be gathered for the whole RTCPeerConnection object. If the RTCPeerConnection object's RTCPeerConnection signalingState is closed, stats should reflect the state at or near the time that signalingState transitioned to closed. Implementations would basically cache a final call to getStats internally as part of transitioning to closed. .: Jan-Ivar :. [1] http://dev.w3.org/2011/webrtc/editor/webrtc.html#methods-5
Since we're moving the stats API to the stats document, this can be done there. This issue should be moved to Github. Dom will.
Filed at https://github.com/w3c/webrtc-stats/issues/3 ; closing for WebRTC