<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.w3.org/Bugs/Public/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.4"
          urlbase="https://www.w3.org/Bugs/Public/"
          
          maintainer="sysbot+bugzilla@w3.org"
>

    <bug>
          <bug_id>26620</bug_id>
          
          <creation_ts>2014-08-20 21:37:05 +0000</creation_ts>
          <short_desc>getStats should be allowed on a closed PeerConnection.</short_desc>
          <delta_ts>2014-10-31 18:30:42 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>WebRTC Working Group</product>
          <component>WebRTC API</component>
          <version>unspecified</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>MOVED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Harald Alvestrand">harald</reporter>
          <assigned_to name="Varun Singh">vsingh.ietf</assigned_to>
          <cc>dom</cc>
    
    <cc>public-webrtc</cc>
          
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>110372</commentid>
    <comment_count>0</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-08-20 21:37:05 +0000</bug_when>
    <thetext>From Jan-Ivar Bruarøy:

I&apos;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:
&gt;     1. If the RTCPeerConnection object&apos;s RTCPeerConnection signalingState is closed, throw an InvalidStateError exception. 

And edit step 5 (which would now be 4):

&gt;     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&apos;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</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114393</commentid>
    <comment_count>1</comment_count>
    <who name="Harald Alvestrand">harald</who>
    <bug_when>2014-10-31 18:27:31 +0000</bug_when>
    <thetext>Since we&apos;re moving the stats API to the stats document, this can be done there.

This issue should be moved to Github. Dom will.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>114394</commentid>
    <comment_count>2</comment_count>
    <who name="Dominique Hazael-Massieux">dom</who>
    <bug_when>2014-10-31 18:30:42 +0000</bug_when>
    <thetext>Filed at https://github.com/w3c/webrtc-stats/issues/3 ; closing for WebRTC</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>