Re: [webrtc-stats] RTCPeerConnection.getStats: What to do with 'selector' argument?

@vr000m Please use spec in examples. `getRemoteStreams` is gone, stats
 are [maplike](https://jsfiddle.net/jib1/4ea0nj0s/), and callbacks 
deprecated. if we don't get it right, no-one will. Here's the spec:
```js
var wait = ms => new Promise(resolve => setTimeout(resolve, ms));

// get audio track RTTs.
var selector = pc.getReceivers()[0].track.getAudioTracks()[0];
var rttMeasures = [];
wait(1000).then(() => pc.getStats(selector))
.then(report => report.forEach(now => {
  if (now.type == "outbound-rtp") {
    rttMeasures.append(now.roundTripTime);
  }
}))
.catch(logError);
```

On the upside, since no-one gets this right, few should be broken by 
missing hyphens (Firefox [plans]() to give hyphen to me above, but not
 @vr000m (because he used non-maplike).

-- 
GitHub Notification of comment by jan-ivar
Please view or discuss this issue at 
https://github.com/w3c/webrtc-stats/issues/116#issuecomment-268052150 
using your GitHub account

Received on Monday, 19 December 2016 19:17:08 UTC