[webrtc-stats] Track stats: track or attachment?

alvestrand has just created a new issue for 
https://github.com/w3c/webrtc-stats:

== Track stats: track or attachment? ==
In implementation discussions, it was asked what the stats for a track
 mean for the case where a track is attached to a PC multiple times.

This is not possible using AddTrack, but is possible using 
ReplaceTrack or AddTransceiver.
The WG has previously said that this is "no special treatment" - if 
you ask for a track to be sent twice, it will be sent twice, and 
surface at the receiver as two tracks.

The cleanest way out seems to be to say that the track stats track the
 attachment of the track to an RTCPeerConnection, so that the sequence

pc.addTrack(a)
pc.addTrack(a)
pc.getStats(a)

will return a stats object with two RTCMediaStreamTrackStats objects 
in it.
For receivers, there is no such discrepancy, because a track is always
 sourced from a single receiver, and can't be detached from it.

@taylor-b @henbos @jan-ivar - comments requested.

Please view or discuss this issue at 
https://github.com/w3c/webrtc-stats/issues/130 using your GitHub 
account

Received on Friday, 6 January 2017 12:17:29 UTC