Connect quality event what to do if we get 3
# ask-ai
l
Connect quality event what to do if we get 3
t
Thanks for reaching out, Piyush. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
When you see a Connection quality event 3 in LiveKit, it means the connection state is "LOST" — basically, a participant has temporarily or maybe even permanently lost their connection to the server. Here’s a friendly checklist to help you handle this situation: • Keep an Eye on Events: Make sure your app listens for the
ConnectionQualityChanged
event so you can spot when someone’s connection drops to "LOST." • Give Users a Heads-Up: Update your UI to gently let users know their connection was lost and suggest they check their internet. • Let LiveKit Do Its Thing: LiveKit tries to reconnect automatically. You can listen for those reconnection events and update your UI to keep users in the loop. • Be Kind to the Connection: Pause any non-essential media processing while the connection is lost to help things bounce back more smoothly. • Use Diagnostics Wisely: Connection quality data can be super helpful for troubleshooting and keeping an eye on your network’s health in your app logs. If you want a hand putting these steps into action, just give me a shout—I’m here to help! Sources: How is Connection Quality determined? | livekit/src/room/mod.rs | livekit-android-test/src/test/java/io/livekit/android/room/RoomMockE2ETest.... | Sources/LiveKit/Protos/livekit_rtc.pb.swift | livekit/livekit_models.pb.go
l
how to run diagnostics?
t
I'm here to help you run diagnostics for connection quality issues in LiveKit! You have two friendly options to choose from, depending on what feels easiest for you. Option 1: Use the Web Tool • Simply visit https://livekit.io/connection-test. • Enter your LiveKit URL along with a valid Room Token. • Click "Start Test" and the tool will take care of the diagnostics for you. Option 2: Programmatically in Your App If you prefer a hands-on approach, you can use the
ConnectionCheck
class from the LiveKit SDK like this:
Copy code
import { ConnectionCheck } from '@livekit/client-sdk';

const checker = new ConnectionCheck({
  url: 'your-livekit-url',
  token: 'your-room-token',
});

const webrtcResult = await checker.checkWebRTC();
const websocketResult = await checker.checkWebsocket();
const turnResult = await checker.checkTURN();

if (checker.isSuccess()) {
  console.log('All checks passed');
} else {
  console.log('Connection issues detected');
}
Make sure to focus on testing WebSocket, WebRTC, and TURN connectivity. And hey, if you run into any questions or need a hand interpreting the results or setting things up, just reach out—I’m here to support you! Sources: Diagnosing Connection Errors with Connection Test Utility | LiveKit Connection Tester | How is Connection Quality determined?
l
in agent side?
t
I'm here to help you run diagnostics for connection quality issues on the agent side in LiveKit. You have a couple of friendly options to explore, so let's walk through them together! Option 1: Connection Test Utility • You can easily use the web tool at https://livekit.io/connection-test to check things like WebRTC, WebSocket, and TURN connectivity. It’s a straightforward way to get some quick insights. • If you prefer a more hands-on approach, you can also integrate diagnostics programmatically using the
ConnectionCheck
class in the LiveKit SDK. This gives you more control and customization. Option 2: Monitoring and Logs • The LiveKit CLI is another great tool to keep an eye on agent status and logs. It includes helpful features like
realtime-room-monitor
to watch room and participant states in real time. • For a deeper dive, the CLI’s
agent-load-test
command lets you simulate real-world usage, so you can see how things perform under different loads. If you’d like, I’m more than happy to guide you through setting up these tools or help you understand the results. Just let me know—I’m here to support you every step of the way! Sources: cmd/lk/perf.go | Diagnosing Connection Errors with Connection Test Utility | Deploying to production | LiveKit Docs | README.md | How is Connection Quality determined?