getVideoStats

Camera statistics — one JSON object per RTP stream, so your own camera publishing a simulcast ladder gives one entry per layer and a remote camera gives one.

Each entry carries trackId, kind, direction ("inbound" / "outbound"), codec, bitrate in kbps, packetsLost, totalPackets, jitter and rtt in ms, and a size object of width / height / framerate. Outbound simulcast entries also carry rid and preferredLayers. Fields the stack cannot measure are left out rather than sent as null, so read them with has(...) / opt… and never assume a key is there.

Blocks briefly. The numbers are deltas over a snapshot the SDK refreshes at most every 400 ms, so polling faster than that returns the same values — about once a second is the useful rate.

Return

the entries, or null when there is no video stream, no room, or the fetch failed. Never an empty array.