how long can a room be active if no vlaue is given...
# ask-ai
b
how long can a room be active if no vlaue is given what is the default
t
Thanks for reaching out, Mohammed. I'm an AI assistant and I'm here to help. Give me a moment while I research this topic.
Thanks for reaching out! I’d love to help you understand how long a room can stay active in LiveKit. Here’s a quick overview: • Empty Timeout: If no one joins the room, it will stay active for 300 seconds (5 minutes) before it closes. This is controlled by the
empty_timeout
setting, which is set to 300 seconds by default. • Departure Timeout: If everyone leaves the room, it will remain open for 20 seconds before closing. This is managed by the
departure_timeout
setting, which defaults to 20 seconds. If these times don’t quite fit your needs, no worries! You can easily adjust them through the RoomService API or configuration settings. I’m here if you want to explore that together! Sources: config-sample.yaml | protobufs/livekit_sip.proto
b
if a particiant is THERE in the room, still is there a limit for how long a room can be alive?
t
I'm happy to share that there's no time limit on how long a LiveKit room can stay active, as long as at least one participant is still in the room. The room will only start closing once everyone has left. After the last participant leaves, the room will stay open for a brief period, which is set by the
departure_timeout
(default: 20 seconds), before it automatically closes. If you have any more questions about this, feel free to ask—I'm here to help! Sources: pkg/rtc/room_test.go | Rooms, participants, and tracks | LiveKit Docs | Core Platform Architecture | livekit/livekit_composite | DeepWiki
b
i want to set a time limit for how long a room can be open for max, how can i do it. even if participants are there
t
Thanks for your question! While LiveKit doesn’t have a built-in feature to set a maximum time limit for how long a room stays open with participants, you can definitely create this functionality yourself. Here’s a simple way to do it: 1. Keep track of when the room was created in your application backend. 2. Set up a timer or scheduler in your service to keep an eye on how much time has passed. 3. Once the time limit you want is reached, you can call the
DeleteRoom
API to close the room. If you’d like, I’m happy to walk you through how to set this up with your backend or a particular SDK. Just let me know, and we’ll figure it out together! Sources: config-sample.yaml | SIP APIs | LiveKit Docs | Docs::Telephony | Avoiding Room ID Reuse When Re-Creating Rooms With the Same Name