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.

Every entry carries trackId, codec, bitrate in kbps, packetsLost, totalPackets, jitter and rtt in ms, network, timestamp, and a size object of width / height / framerate.

Your own camera's entries also carry limitation ("none", "cpu", "bandwidth" or "other"), encoderImplementation, and rid, the simulcast layer the entry reports — left out for a single-layer camera.

A remote camera's entry can also carry currentSpatialLayer, currentTemporalLayer, preferredSpatialLayer, preferredTemporalLayer, freezeCount, totalFreezesDuration, pauseCount and totalPausesDuration.

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; an empty array when there is no video stream or the fetch failed, as on iOS. null when there is no room.