title: WebRTC getStat() API Set UP
body: <p>I am trying to use getStat() from WebRTC's api to see if it provides any useful info measure latency and other video streaming data. The problem is that there's not much info of how to use it. 
  Even older existing examples are pretty rare but the api has changed since then. </p>
  
  <p>For example, my set up:</p>
  
  <pre><code>peerconnection.getStats(function(stats) { 
                            console.log(stats); } ));
  </code></pre>
  
  <p>This returns a RTCStatsResponse object with 2 functions</p>
  
  <pre><code>RTCStatsResponse {result: function, namedItem: function}
  </code></pre>
  
  <p>Trying to call that result() function returns an array of RTCStatsReport objects with type 'googLibjingleSession' for the 1st object and type 'googTrack' for the 2nd object. The other nameItem function is undefined when trying to call it</p>
  
  <pre><code>[RTCStatsReport, RTCStatsReport]
  </code></pre>
  
  <p>From what little info available (<a href="https://groups.google.com/forum/#!topic/discuss-webrtc/fpr4yn4-3sg">https://groups.google.com/forum/#!topic/discuss-webrtc/fpr4yn4-3sg</a>), I would be getting alot more RTCStatObjects with more useful info than I am currently getting. </p>
  
  <p>Does anyone have experience with using webrtc's getStats? I believe I may not be doing this correctly </p>