StatsTracer

class StatsTracer(pc: PeerConnection, peerType: ERROR CLASS: Symbol not found for PeerType)

Collects and processes WebRTC stats for publishers and subscribers.

Parameters

pc

current PeerConnection

peerType

whether this side is PUBLISHER or SUBSCRIBER

trackIdToTrackType

mapping from WebRTC track IDs to TrackType (audio / video / screen-share…)

Constructors

Link copied to clipboard
constructor(pc: PeerConnection, peerType: ERROR CLASS: Symbol not found for PeerType)

Functions

Link copied to clipboard
suspend fun get(trackIdToTrackType: Map<String, ERROR CLASS: Symbol not found for TrackType>): ComputedStats

Collects the latest statistics and returns: