Skip to main content
The SDK provides real-time WebRTC stream statistics for monitoring connection quality, performance, and diagnostics.

Getting stats with UIControl

The simplest way to get current statistics:
getStreamStats() triggers the stats panel internally, collects the data, and returns a parsed JavaScript object.

Stats via event listener

For continuous monitoring, listen for the statsReceived event:

Available stat fields

From getStreamStats() (parsed key-value object)

From statsReceived event (aggregated stats object)

Resolving codec names

The codecs field is a JavaScript Map, not a plain object. Use .get(codecId) to look up codec names — bracket notation will not work.
The codecId in stats is a raw identifier. To get the human-readable name:

Next steps

UIControl API

Reference for getStreamStats() and other helpers.

Troubleshooting

Diagnose connection and codec issues using stats.