The SDK provides real-time WebRTC stream statistics for monitoring connection quality, performance, and diagnostics.Documentation Index
Fetch the complete documentation index at: https://docs.streampixel.io/llms.txt
Use this file to discover all available pages before exploring further.
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 thestatsReceived event:
Available stat fields
From getStreamStats() (parsed key-value object)
| Field | Type | Description |
|---|---|---|
Framerate | number | Current video frames per second |
Net RTT (ms) | number | Network round-trip time in milliseconds |
Frames Decoded | number | Total video frames decoded |
Frames dropped | number | Total video frames dropped |
Received | number | Total data received |
Packets Lost | number | Total packets lost |
Video codec | string | Video codec and parameters |
Audio codec | string | Audio codec and parameters |
Video resolution | string | Current video resolution (e.g., “1920x1080”) |
Video Bitrate (kbps) | number | Current video bitrate |
Audio Bitrate (kbps) | number | Current audio bitrate |
Duration | string | Session duration (HH:MM:SS format) |
Controls stream input | boolean | Whether this client controls UE input |
Video quantization parameter | number | Current video QP value |
From statsReceived event (aggregated stats object)
| Object | Field | Description |
|---|---|---|
inboundVideoStats | bitrate | Video bitrate (kbps) |
frameWidth | Video frame width | |
frameHeight | Video frame height | |
framesPerSecond | FPS | |
framesDecoded | Total frames decoded | |
framesDropped | Total frames dropped | |
packetsLost | Total packets lost | |
codecId | Reference to codec in codecs Map | |
inboundAudioStats | bitrate | Audio bitrate (kbps) |
codecId | Reference to codec in codecs Map | |
sessionStats | duration | Session duration in seconds |
currentRoundTripTime | RTT in seconds (multiply by 1000 for ms) | |
codecs | Map | Map<codecId, { mimeType }> — lookup codec names |
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.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.