StatsTracer

class StatsTracer(pc: PeerConnection, peerType: <Error class: unknown class>)

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: unknown class>)

Functions

Link copied to clipboard
suspend fun get(trackIdToTrackType: Map<String, <Error class: unknown class>>): ComputedStats

Collects the latest statistics and returns: