getNetworkStats()
Returns a snapshot of the current network statistics, calculated from WebRTC stats. Stats in stats.latest are updated approximately every two seconds — poll this method to monitor network performance over time.
If a value cannot be determined for a given interval, it is set to null. This most commonly occurs for packetLoss calculations due to the values it relies upon being missing or stale, or media not being transmitted. For instance, if you join a call with audio and video off, your bitrates will be 0 and packetLoss will be null because it is unknown.
Return value
Returns aPromise<DailyNetworkStats>:
Current network quality assessment:
'good', 'warning', 'bad', or 'unknown'. Calculated from send/receive packet loss, round trip time, and available outgoing bitrate, averaged over a ~30-second rolling window. In Prebuilt, Daily lowers bandwidth at 'warning' and disables the local camera at 'bad'.Reasons for the current
networkState. Possible values: 'sendPacketLoss', 'recvPacketLoss', 'roundTripTime', 'availableOutgoingBitrate'. Empty when state is 'good' or 'unknown'.Network statistics. Empty object (
{}) when stats are not yet available.Deprecated in 0.77.0. Use
networkState instead. Was 'good', 'low', or 'very-low'.Deprecated in 0.77.0. Was a subjective 1–100 quality score.