Expand description
Statistics module for WebRTC.
This module provides:
stats- W3C WebRTC Statistics API typesreport- 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::peer_connection::RTCPeerConnection;
use rtc::rtp_transceiver::RTCRtpSenderId;
use rtc::statistics::StatsSelector;
use std::time::Instant;
// 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§
Enums§
- Stats
Selector - Selector for filtering statistics in
get_stats().