getStats interface #82

Closed
aboba opened this Issue May 9, 2014 · 5 comments

Projects

None yet

3 participants

@aboba
Contributor
aboba commented May 9, 2014

From Shijun Sun:

I’ve been thinking more about the getStats() interface.

One possible way to separate it from other objects is probably to define it as

Interface RTCStats{
void getStats(object, success_callback, failure_callback);
}

The “object” can be RtpSender, RtpReceiver, IceTransport, DtslTransport, SdesTransport, etc. and can be extended without changing other existing objects.

@robin-raymond
Contributor

Might be even better as a Promise result, but I like it.

@martinthomson
Member

I think that duck-typing is likely to be better, as in:

interface RTCStatsSource {
  Promise<RTCStats> getStats();
};
interface RTCRtpSender implements RTCStatsSource;
@aboba
Contributor
aboba commented May 11, 2014

How about this?

typedef (RTCRtpSender or RTCRtpReceiver or RTCDtlsTransport or RTCIceTransport or RTCSctpTransport) RTCStatsObject;
interface RTCStats {
Promise getStats (RTCStatsObject object, RTCStatsCallback successCallback, RTCErrorCallback failureCallback);
};

@robin-raymond robin-raymond added the 1.1 label May 13, 2014
@robin-raymond robin-raymond pushed a commit to robin-raymond/ortc that referenced this issue May 14, 2014
Robin Raymond - ICE restart explanation added, as described in Issue 59
w3c#59

-Fixes for error handling, as described in Issue 75
w3c#75

- Fixes for miscellaneous NITs, as described in Issue 76
w3c#76

- Enable retrieval of the SSRC to be used by RTCP, as described in Issue 77
w3c#77

- Support for retrieval of audio and video capabilities, as described in Issue 81
w3c#81

- getStats interface updated, as described in Issue 82
w3c#82

- Partially addressed SVC issues described in Issue 83
w3c#83

- Partially addressed statistics update issues described in Issue 85
w3c#85
30c585c
@robin-raymond
Contributor

Stats are still a mess in current spec. I like the way martin did it.

@aboba
Contributor
aboba commented Jun 15, 2014

Shijun's proposal added in the latest editor's draft:
http://ortc.org/wp-content/uploads/2014/06/ortc.html

@aboba aboba closed this Jun 15, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment