WebRTC Metrics
A comprehensive overview of WebRTC statistics, derived calculations, extracted features, and observable signals, to better understand call quality, connectivity, and user experience in rtcStats
On this page4 sections
Client track lifecycle (feature)
Last updated Applies tortcstats-serverrtcstats.com
Client-level features flagging tracks that ended, or ended almost immediately after capture.
Description
Client-level features, extracted per session into features_client. These cover tracks that are not bound to a peer connection.
rtcstats-server derives these flags from the client trace:
audioEnded- an audio track fired itsonendedevent during the session.videoEnded- a video track fired itsonendedevent during the session.audioShortDuration- an audio track ended less than 1000 ms after getUserMedia succeeded.videoShortDuration- a video track ended less than 1000 ms after getUserMedia succeeded.
Why it matters
A track that fires onended on its own was not stopped by your code: the device was unplugged, the driver dropped it, or the OS pulled the stream. The short-duration flags are the sharper signal. A track that dies within a second of a successful getUserMedia almost never reflects a user who joined and left on purpose; it points at a broken or busy device, a permission that was granted then revoked, or a capture that never really started. Trending these flags across the population surfaces flaky-hardware cohorts and instant-hangup patterns that a plain success count hides, because getUserMedia reports success right before the track collapses.
SQL example
Rate of tracks that died within a second of capture, last 7 days:
SELECT
COUNT(*) FILTER (WHERE client.audio_short_duration)::float / NULLIF(COUNT(*), 0) AS audio_short_rate,
COUNT(*) FILTER (WHERE client.video_short_duration)::float / NULLIF(COUNT(*), 0) AS video_short_rate
FROM "rtcstats-server" AS server
JOIN features_metadata AS metadata ON metadata.dump_id = server.id
JOIN features_client AS client ON client.dump_id = metadata.id
WHERE server.created_at > NOW() - INTERVAL '7 days';
See also
- rtcstats-server feature extraction - the full feature reference. These features are extracted by rtcstats-server and live in the open-source
rtcstats-featurespackage. - How to query rtcstats-server features - more SQL recipes.