Returns current network quality stats and per-interval send/receive metrics.
getNetworkStats() Prebuilt CustomReturns 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 a Promise<DailyNetworkStats>:
string
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'.
string[]
Reasons for the current networkState. Possible values: 'sendPacketLoss', 'recvPacketLoss', 'roundTripTime', 'availableOutgoingBitrate'. Empty when state is 'good' or 'unknown'.
DailyNetworkStatsData | {}
Network statistics. Empty object ({}) when stats are not yet available.
Show stats fields
number
Average round trip time over the course of the call.
number
Highest audio receive packet loss seen during any reporting interval.
number
Highest audio send packet loss seen during any reporting interval.
number
Highest video receive packet loss seen during any reporting interval.
number
Highest video send packet loss seen during any reporting interval.
number
Highest video receive jitter seen during any reporting interval.
number
Highest video send jitter seen during any reporting interval.
number
Highest audio receive jitter seen during any reporting interval.
number
Highest audio send jitter seen during any reporting interval.
object
Statistics from the most recent reporting interval (~2s).
Show latest fields
number
Unix timestamp (ms) of when the stats were recorded.
number | null
Total incoming bits per second (audio + video).
number | null
Total outgoing bits per second (audio + video).
number | null
Average round trip time across all connections.
number | null
Average available outgoing bitrate across all connections.
number | null
Incoming audio payload bits per second.
number | null
Outgoing audio payload bits per second.
number | null
Estimated packet loss percentage for incoming audio.
number | null
Estimated packet loss percentage for outgoing audio. Always null in Firefox.
number | null
Incoming video payload bits per second.
number | null
Outgoing video payload bits per second.
number | null
Estimated packet loss percentage for incoming video.
number | null
Estimated packet loss percentage for outgoing video.
number | null
Overall estimated packet loss for all incoming media.
number | null
Overall estimated packet loss for all outgoing media.
number | null
Average jitter across inbound video streams.
number | null
Average jitter across outbound video streams.
number | null
Average jitter across inbound audio streams.
number | null
Average jitter across outbound audio streams. Always null in Firefox.
string
deprecated
Deprecated in 0.77.0. Use networkState instead. Was 'good', 'low', or 'very-low'.
number
deprecated
Deprecated in 0.77.0. Was a subjective 1–100 quality score.
Firefox does not report send-side packet loss or jitter for audio (audioSendPacketLoss and audioSendJitter are always null), and does not provide availableOutgoingBitrate, networkRoundTripTime, or averageNetworkRoundTripTime.