Skip to main content

Module statistics

Module statistics 

Source
Expand description

Statistics module for WebRTC.

This module provides:

  • stats - W3C WebRTC Statistics API types
  • report - Statistics report generation

§Stats Selection

When calling get_stats(), you can optionally provide a StatsSelector to filter the returned statistics to only those relevant to a specific sender or receiver.

§Example

use rtc::statistics::StatsSelector;

// Get all stats
let all_stats = pc.get_stats(Instant::now(), StatsSelector::None);

// Get stats for a specific sender
let sender_stats = pc.get_stats(Instant::now(), StatsSelector::Sender(sender_id));

Modules§

report
WebRTC Statistics Report types.
stats
WebRTC Statistics API types.

Enums§

StatsSelector
Selector for filtering statistics in get_stats().