PSA: getStats only exposes codecs currently in use in M108

181 views
Skip to first unread message

Henrik Boström

unread,
Sep 27, 2022, 4:15:20 AM9/27/22
to discuss-webrtc
I recently announced that less RTCCodecStats objects would be exposed in M107 due to not exposing duplicate information for every m= section.

A recent change has brought down the number of codec stats objects even further, by only exposing the stats objects that are currently in use (i.e. referenced by an RTP stream). This reduces the size/bloat of the stats report and allows for more efficient implementations, but it also removes some information.

This means that getStats() no longer contains codecs that were negotiated and could be used but aren't. If you want to know which codecs were negotiated but aren't in use, see RTCRtpSender/RTCRtpReceiver.getParameters().codecs instead and if you want to know about codec capabilities, see RTCRtpSender/RTCRtpReceiver.getCapabilities().codecs instead.

Reply all
Reply to author
Forward
0 new messages