Contact emails
Spec
Motivation
Performing the
stats selection algorithm returns a filtered set of stats (
stats dictionaries spec), it is convenient to only get the relevant set of stats for the sender/receiver of interest because there can be a lot of unrelated stats returned by a full getStats() call.
We have already shipped "Promise<RTCStatsReport> getStats()" on RTCPeerConnection on Chrome, this change adds an "optional MediaStreamTrack? selector = null" argument to it and adds "Promise<RTCStatsReport> getStats()" to RTCRtpSender and RTCRtpReceiver (interfaces previously shipped without it).
Compatibility Risk
Low. This adds APIs without removing anything and there is already Firefox support for them.
There already exist a "void getStats(callback, optional selector)" API in Chrome but there is no way to confuse a callback with a MediaStreamTrack in terms of whether to call the legacy or spec-compliant version of RTCPeerConnection.getStats().
Ongoing technical constraints
None. This is already implemented behind flag, CLs going through the CQ.
Will this feature be supported on all six Blink platforms (Windows, Mac, Linux, Chrome OS, Android, and Android WebView)? Yes or no.
Yes.
Launch tracking bug
Link to entry on the Chrome Platform Status
Requesting approval to ship?
Yes.
I will ship all three APIs at the same time:
- RTCPeerConnection.getStats(optional MediaStreamTrack? selector = null)
- RTCRtpSender.getStats()
- RTCRtpReceiver.getStats())
Target milestone: M67.