Networks drop: a host walks out of Wi-Fi range, a viewer's phone switches to cellular. This page explains what happens then, and how to keep your stream running.
Where this fits: hosts and viewers are normal RTC room participants. So everything in RTC → Reconnection & network quality works here too. This page covers the parts that matter for live streams.
What happens when the network drops
- The SDK notices the connection is gone and fires
reconnecting. - It tries to rejoin on its own, waiting a little longer between each try.
- If it gets back in, it fires
reconnected. Video and chat carry on. - If every try fails, it gives up with
CONNECTION_FAILED.
While a host is reconnecting, viewers just see the video freeze or go blank.
The stream itself stays LIVE. The time a host spends reconnecting doesn't
count toward host-hours.
To check live quality (bitrate, packet loss, round-trip time), use
room.getConnectionStats(). See Diagnostics.
Show a "reconnecting" banner
Show the user what's happening, so they don't think your app froze. In your app:
stream.room.on('reconnecting', () => showBanner('Reconnecting…'));
stream.room.on('reconnected', () => hideBanner());import { useConnectionState } from '@livqeno/react';
const state = useConnectionState(); // works inside <LivqenoLiveStream> — same as any LivqenoRoomstream.room.on('reconnecting', () => showBanner('Reconnecting…'));stream.room.connectionStateChanges.listen((state) {
if (state == LivqenoConnectionState.reconnecting) showBanner('Reconnecting…');
});The one thing to plan for: token expiry
On the web, each reconnect presents the same RTC token the person
joined with: LiveStream from @livqeno/live doesn't take a
refreshToken yet. On React Native, LivqenoLiveStream does (pass
refreshToken in its options, returning a fresh token for the same stream
and identity), and the rest of this section only applies when you leave it
out.
The RTC token inside a live-stream credential lasts 10 minutes by default (stock configuration). So:
- A host who drops within the token's lifetime reconnects on their own.
- A host who drops after it has expired, say 40 minutes into a one-hour
stream, can't reconnect with it. The server refuses the expired token, and
the SDK eventually gives up with
CONNECTION_FAILED.
Common mistakes
| Mistake | What you'll see | Fix |
|---|---|---|
| No reconnect UI | Users think the app froze when video stops. | Show a banner on reconnecting. |
| Reusing the old credential after a failure | TOKEN_EXPIRED again. | Always ask your backend for fresh credentials. |
| Ending the stream when a host drops | The stream can't be restarted. | Wait for the host to rejoin. Only call end() when the event is really over. |
Next steps
- RTC → Reconnection & network quality: the full reconnect behavior and events.
- Analytics: see who's watching.