useNetwork and useCPULoad let you surface connection quality to users and adapt the UI when conditions degrade.
Show network quality
useNetwork returns the current networkState, the reasons behind it, and the connection topology:
'warning' or 'bad', networkStateReasons tells you why ('sendPacketLoss', 'recvPacketLoss', 'roundTripTime', 'availableOutgoingBitrate'), which is useful for a tooltip or a targeted hint:
The older
quality (1-100) and threshold fields are deprecated as of 0.23.0. Use networkState and networkStateReasons instead.React to changes
PassonNetworkQualityChange and onNetworkConnection to run side effects, such as toast notifications, when the network changes:
Detailed stats
For richer diagnostics,getStats() returns the latest network statistics (the same data as the daily-js getNetworkStats() method):
Topology
topology is 'peer', 'sfu', or 'none', telling you whether the call is peer-to-peer or routed through Daily’s SFU. This is informational; it changes automatically as the call scales. See video architecture for what drives it.
Monitor CPU load
A choppy call is often the device, not the network.useCPULoad reports whether Daily is under CPU pressure and why:
Adapting to poor conditions
A common pattern: when the network is'bad', reduce what you send or receive. Lower the published quality with useSendSettings, or reduce what you subscribe to with useReceiveSettings:
Next steps
Rendering media
Render placeholders when video drops.
Video architecture
Peer-to-peer vs SFU, and what topology means.