Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

getStats interface #82

Description

@aboba

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.

Activity

  1. robin-raymond commented on May 9, 2014

    @robin-raymond
    Contributor

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

  2. martinthomson commented on May 9, 2014

    @martinthomson
    Contributor

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

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

    @aboba
    ContributorAuthor

    How about this?

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

  4. robin-raymond commented on May 14, 2014

    @robin-raymond
    Contributor

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

  5. aboba commented on Jun 15, 2014

    @aboba
    ContributorAuthor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions