- From: Harald Alvestrand <harald@alvestrand.no>
- Date: Tue, 02 Oct 2012 15:22:02 +0200
- 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 [
Callback
] 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
timestamps.)
- 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....
Harald
Received on Tuesday, 2 October 2012 13:22:37 UTC