Method GetStats
GetStats()
Returns an AsyncOperation which resolves with data providing statistics.
Declaration
public RTCStatsReportAsyncOperation GetStats()
Returns
Type | Description |
---|---|
RTCStatsReportAsyncOperation | An AsyncOperation which resolves with an RTCStatsReport object providing connection statistics. |
Examples
// Already instantiated peerConnection as RTCPeerConnection.
var operation = peerConnection.GetStats();
yield return operation;
if (!operation.IsError)
{
var report = operation.Value;
foreach (var stat in report.Stats.Values)
{
Debug.Log(stat.Type.ToString());
}
}