W3C home > Mailing lists > Public > public-webrtc@w3.org > October 2012

Current stats interface as implemented - issues

From: Harald Alvestrand <harald@alvestrand.no>
Date: Tue, 02 Oct 2012 15:22:02 +0200
Message-ID: <506AEA7A.8010603@alvestrand.no>
To: "public-webrtc@w3.org" <public-webrtc@w3.org>
Hello folks,
here's the current IDL for the stats interface as implemented in WebKit 
(extra fluff deleted):

     interface [
     ] RTCStatsCallback {
         boolean handleEvent(in RTCStatsResponse response);

     interface [
     ] RTCStatsResponse {
         sequence<RTCStatsReport> result();

     interface [
     ] RTCStatsReport {
         sequence<RTCStatsElement> local();
         sequence<RTCStatsElement> remote();

     interface [
     ] RTCStatsElement {
         readonly attribute long timestamp;
         DOMString stat(in DOMString name);

Implementing this brought several questions to mind:

- What's the format of a timestamp? A "long" can't be an int32 of 
milliseconds since Jan 1, 1970 - because that would run out of bits some 
time in August 1970. What time representations do other Web APIs use, 
and why?

- What was I trying to achieve with the sequences in local() and 
remote()? Would it be equally powerful as single (optional) elements? 
(The reason for having them separate is that they have different 

- Picking up on an earlier discussion: Should we make the argument to 
RTCStatsCallback be a sequence<RTCStatsReport>, and lose the 
RTCStatsResponse type from the IDL?

Implementation makes for clearer questions....

Received on Tuesday, 2 October 2012 13:22:37 UTC

This archive was generated by hypermail 2.3.1 : Monday, 23 October 2017 15:19:30 UTC