getAudioStats

This method can be used to get the audio statistics for this participant.

For the local participant, this returns the outgoing audio stats. For a remote participant, this returns the incoming audio stats.

Note: This is an asynchronous operation.

Code Example:


val audioStats = participant.getAudioStats()
if (audioStats != null) {
    Log.d("Stats", "Audio stats: $audioStats")
}

Return

a JSONObject containing audio statistics, or null if no audio stream is active or an error occurs