Cross-reference

getStats & webrtc-internals

Where it enters the lineage

This concept is first developed in § m6-l4 — Reading the Instruments: getStats(). The historical problem there matters: WebRTC components are not arbitrary layers; each is a repair for a specific limit in the system before it.

1What it is

The observability surface: the RTCStatsReport id-reference graph, delta discipline for cumulative counters, unit traps, and reading chrome://webrtc-internals and about:webrtc dumps.

Stats counters are cumulative samples in an id-linked graph. Diagnostic tools must join by references, calculate deltas with timestamps, respect units, and segment by direction, track, transport, and selected candidate pair.

2How to reason about it

A global average can remain healthy while a browser, network, or relay-path segment regresses badly. Useful call-quality pipelines retain enough dimensions for diagnosis, use percentiles for long-tailed latency, and impose minimum sample sizes before alerting.

Separate the control plane from the data plane, then name the clock, identifier, and unit attached to each observation. Ask what is negotiated, what is measured live, and what is merely configured. A robust explanation predicts both a successful trace and the characteristic failure trace.

inputstate · packet · framegetStats & webrtc-intemechanismprooftrace
Concept plate — Follow the mechanism to an observation that can falsify your model.

3Its role in WebRTC

In an application, this concept does not stand alone. It participates in a chain of negotiation, transport, media processing, and feedback. The practical boundary is the API, SDP attribute, RTP/RTCP field, or stats record where the browser exposes it. Use that boundary in tests: feed controlled input, observe the named output, and verify fallback behavior when the preferred path is unavailable.

A useful study method is to draw three columns: configured, negotiated, and observed. Put application preferences and constraints in the first, the answer's accepted parameters in the second, and live packet, state, or stats evidence in the third. Disagreements between columns are diagnostic information. They reveal fallback, unsupported capability, stale state, or a mistaken assumption about which endpoint controls the behavior. This method scales from a single codec preference to an ICE restart or a multi-layer SFU route.

Diagnostic discipline

Do not infer success from configuration alone. A codec in capabilities is not necessarily negotiated; a candidate in SDP is not necessarily selected; a connected peer connection is not necessarily receiving decodable frames. Prefer the narrowest live evidence.

4Failure questions

QuestionEvidence
Was it negotiated or selected?Inspect the answer and the live stats graph.
Did the state transition complete?Record ordered events with timestamps.
Are counters moving in the expected direction?Compute deltas; never compare unrelated cumulative samples.
What happens beyond the latency or capacity budget?Inject delay, loss, reordering, or constrained bandwidth.

5Related concepts

  • PCM & Digital Sampling — Sampling theorem, quantization, bit depth, μ-law/A-law companding and G.711, plus psychoacoustic context — why 8 kHz was chosen in 1962 and why WebRTC runs at 48 kHz internally.
  • SDP — The session description grammar from Mbone/SAP announcements through RFC 8866, including the WebRTC attribute dialect (BUNDLE, mid, msid, fingerprint, rid) — a flyer conscripted into being a contract.
  • SIP (& H.323) — The VoIP signaling war: telco-culture H.323 versus internet-culture SIP, whose SDP-carrying offer/answer habits and glare problem WebRTC inherited.
  • WHIP & WHEP — HTTP-based WebRTC ingest and egress — WHIP (RFC 9725) and WHEP (draft-ietf-wish-whep-03, expired February 2026 and not an RFC as of July 2026, mirroring WHIP's single-POST design): the RTMP-ingest succession story, offer/answer mechanics, and WebRTC's place on the broadcast latency spectrum.

6Further reading

WebRTC: From First Principles · Concept reference