OBSERVERTC / Client Monitor

Monitor events

Events let your application react while a call is running. Listen for a completed collection to refresh a diagnostics view, for a created sample to forward data, or for an issue to show a warning.

Listen to local updates

monitor.on('stats-collected', () => {
  console.log(monitor.receivingVideoBitrate);
});
monitor.on('sample-created', ({ sample }) => {
  sendSample(sample);
});
EventUse it for
stats-collectedRead freshly updated live metrics.
sample-createdForward a serializable sample to your backend.
issueReact to a newly reported problem.
issue-updatedRefresh details of an ongoing problem.
issue-resolvedClear a warning when its problem ends.
scoreRefresh a quality indicator and inspect its reasons.

Local callbacks can contain live monitor objects. Send a ClientSample to your backend rather than serializing arbitrary callback payloads.

Record an application event

Application events explain what happened in your product, such as a user joining or an application action changing the call. They are distinct from local callbacks. addEvent() records a serializable ClientEvent for samples.

Automatic sampling normally buffers these records. If you disable automatic sampling and create samples yourself, set bufferingEventsForSamples: true. With both mechanisms disabled, addEvent() neither buffers the record nor emits client-event.

See application context for attachments and extension measurements, and monitor issues for problem lifecycles.

Complete event payload reference.

Version coverage varies by reference. Source revisions · Markdown source