per-DataChannel stats: on PeerConnection or on DataChannel?

​In the current WebRTC draft, we have:

partial interface RTCPeerConnection {
    void getStats (MediaStreamTrack? selector, RTCStatsCallback
successCallback, RTCPeerConnectionErrorCallback failureCallback);
}

To add the ability to get stats about a particular RTCDataChannel do we
want to have

A.  ​PeerConnection.getStats(RTCDataChannel, ..., ...), like so:

partial interface RTCPeerConnection {
    void getStats (RTCDataChannel? selector, RTCStatsCallback
successCallback, RTCPeerConnectionErrorCallback failureCallback);
}


or


B.  RTCDataChannel.getStats(..., ...) like so:



partial interface RTCDataChannel {
    void getStats (RTCStatsCallback successCallback,
RTCPeerConnectionErrorCallback failureCallback);
}



I prefer B.  LIkewise, I think it makes sense to eventually have
RtpSender.getStats, DtlsTransport.getStats, and IceTransport.getStats.
That way, the browser doesn't have to gather stats about everything to get
stats about something, and we don't have to add a new
PeerConnection.getStats overload for every single new object we add.


Has there already been discussion about this that I don't remember?

Received on Thursday, 18 December 2014 20:21:23 UTC