getStats

suspend fun getStats(selector: MediaStreamTrack? = definedExternally): RTCStatsReport(source)

The getStats() method of the RTCPeerConnection interface returns a promise which resolves with data providing statistics about either the overall connection or about the specified MediaStreamTrack.

MDN Reference