getStatsAsync

fun getStatsAsync(selector: MediaStreamTrack? = definedExternally): Promise<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