Skip to main content
testCallQuality() Prebuilt Custom
Prebuilt runs this test automatically as part of its prejoin UI.
Assesses a user’s network performance before joining a Daily call. The method connects to a Daily room and streams video to Daily’s infrastructure for up to 30 seconds, collecting outbound WebRTC stats. Results represent the average values over the test period. Must be called after preAuth() or startCamera() and before join(). If Adaptive Bitrate is enabled (default for 1:1 calls), results are stored on the call instance and used at join time to initialize the highest simulcast layer appropriately.

Return value

Returns Promise<DailyCallQualityTestResults>.
'good' | 'warning' | 'bad' | 'aborted' | 'failed'
Overall connection quality verdict:
  • 'good'avgSendPacketLoss < 5%, maxRoundTripTime < 300ms, avgSendBitsPerSecond ≥ 1,100,000
  • 'warning'avgSendPacketLoss 5–10%, maxRoundTripTime 300–600ms, avgSendBitsPerSecond 700,000–1,100,000
  • 'bad'avgSendPacketLoss ≥ 10%, maxRoundTripTime ≥ 600ms, avgSendBitsPerSecond < 700,000
  • 'failed' — test meeting ended in error; error details are included in the result
  • 'aborted' — test stopped before data gathering started (e.g. join() or stopTestCallQuality() called too quickly)
number
Seconds over which data was collected (up to 30). Timer starts after the test has joined a call and begun sending data.
object
Underlying stats used to determine the result. All averages use an exponential moving average biased toward the most recent data.
  • maxRoundTripTime (seconds) — maximum currentRoundTripTime sampled
  • avgRoundTripTime (seconds) — average currentRoundTripTime
  • avgSendPacketLoss (percentage) — average outbound packet loss. Depending on the browser, this is based off either fractionLost or packetsLost/ packetsSent.
  • avgAvailableOutgoingBitrate (bps) — average availableOutgoingBitrate (not available on Firefox)
  • avgSendBitsPerSecond (bps) — average outbound bitrate (delta bytesSent / delta time)
string
Session ID of the test call. Test calls use a private domain and do not appear in your account dashboard.
string
Human-readable error message. Only present when result === 'failed'.
DailyFatalErrorObject
Structured error object with type, msg, and details. Only present when result === 'failed' and error details are available.

Example

If the test returns 'bad' and adaptive bitrate is disabled or the client is on Firefox, consider calling updateSendSettings() with 'bandwidth-optimized' before joining.

Example failure result

See also