Breakout Rooms/Video Channels #55

Open
opened 2026-04-14 19:57:31 +00:00 by kirsle · 0 comments
Owner

This is a feature idea to add "breakout rooms" or smaller focused video-only channels to the chat room.

The Problem

As a chat room grows more popular, there can be too many people on webcam all at once which makes it difficult for people to have voice group chats over webcam.

This was observed on the website that BareRTC was originally written for: in the early years when there might have only been 8 or 9 people on webcam in total, it was possible for everybody to open every camera and voice chats were commonplace. But nowadays when there are 20 to 40+ different webcams active, it is much more difficult for various reasons:

  • Not everybody's device is powerful enough to have 20+ cameras on screen at once, even if they wanted to. Their browser ends up freezing or crashing, or their network bandwidth can't cope with it all.
  • When some people are having a voice chat, it's difficult to identify who is talking with who, so that you know which other cameras you should open to follow both sides of the discussion.
  • Cross talk, if different voice chats are happening simultaneously with party members who don't all overlap with each other.

In practice, most people just keep their mic muted. This feature idea is to find a way to support smaller group voice chats better.

The Idea

On the Channels list on the left side of the chat room, there should be a "Video Channels" section which lists smaller breakout rooms (including the avatars of the people in each room). Clicking into one of those rooms should prompt you to activate your camera, and put you on a group video call with all the participants of the room.

  • Each room would have a max capacity limit (configurable in settings.toml), such as 10 or 12 people max.
  • The settings.toml could define a list of default rooms to start with, which would always be visible.
  • Users can create their own breakout rooms in case the existing ones are all full.

When a user is in a breakout room:

  • Their camera must be on, and they are on a video call with all other members of the room.
  • Their camera is NOT available to watch for people in the general chat room channels.
  • They can ONLY watch the cameras of their breakout room partners, not other cameras on the general chat room.
  • They can only reside in one breakout room at a time.

Implementation

The following changes would need to be made to support this feature:

Backend: WebSocket Subscriber

The Subscriber object would need a field added for VideoChannel (string) holding onto the channel ID of the breakout room they are in.

If the value is empty, they are not in a breakout room (default).

Backend: Breakout Rooms

The backend server would need a struct to store the current state of all the breakout rooms:

  • A channel ID (string)
  • List of participants in the channel (usernames []string)

Backend: Protocol Messages

Protocol messages for the WebSocket should be added:

  • Breakout Room Status: this should be like a Who's Online list broadcast that pushes out the complete state of the current breakout rooms. Their names/channel IDs, participants list, etc.

  • Join Breakout Room: the client should send this message to the server when they confirm to join the room.

    The server should validate that the client's video status is active before allowing them in.

    The server should update the Breakout Rooms struct, set the Subscriber.VideoChannel string to match, and broadcast the Breakout Room Status to everybody.

    Maybe: a server side message confirming that the Join Breakout Room was successful.

Backend: Who's Online List

When the Who's Online list is broadcast out:

Users who are on webcam and who are also in a breakout room: they should not send their Video Flag to the general population, so their webcam will appear offline and the gen pop can't watch their camera.

Likewise: if a user is in a breakout room, they do not receive the Video Flag from other chatters who are outside the room, only the flag for members of their breakout room.

Frontend UI

Since the frontend is where WebRTC logic happens, it would need some changes to support the feature.

  • When the user clicks on a breakout room from the left panel channel list:

    A screen should appear explaining what a breakout room is, listing the current members of the room and prompting the user whether they want to join the room.

    If they want to join, their camera needs to be activated first and only when it has been activated are they put into the room.

    If they are already in another breakout room, the prompt should be worded that they will switch to the new room if they confirm.

  • While the user is in a breakout room:

    The Who's Online list will only send video flags for the other participants of the room. The chat page should automatically open all of those cameras, while sending the current user's video on the offer, to establish the two-way video calls with each member.

    If a video connection with another member fails, the page should automatically try again a couple of times.

  • Breakout rooms can also have a text chat channel.

    When the user is IN the room, show a chat history screen as normal.

  • If the user turns off their webcam: remove them from the breakout room.

Errors/Edge Cases

  • Webcam boots: they should be waived/ignored while a user is in the breakout room.

    If you booted somebody off your camera before, and you both join a breakout room, you will see each other's cameras again.

    No option to boot people while in a breakout room.

  • Auto-remove users from rooms if their webcam can't be connected to.

    Usually, if one person is on a poor network and nobody can open their camera, also that person can not open anybody else's camera in turn. In this case, for the affected person who can't connect to anybody in the room, they should automatically leave the room with a relevant error message.

    From the other side/for safety: maybe user pages can report to the server when they aren't able to load That One Person's camera. If the consensus is that nobody can load the camera, that person should be removed from the room.

This is a feature idea to add "breakout rooms" or smaller focused video-only channels to the chat room. ## The Problem As a chat room grows more popular, there can be too many people on webcam all at once which makes it difficult for people to have voice group chats over webcam. This was observed on the website that BareRTC was originally written for: in the early years when there might have only been 8 or 9 people on webcam in total, it was possible for everybody to open every camera and voice chats were commonplace. But nowadays when there are 20 to 40+ different webcams active, it is much more difficult for various reasons: * Not everybody's device is powerful enough to have 20+ cameras on screen at once, even if they wanted to. Their browser ends up freezing or crashing, or their network bandwidth can't cope with it all. * When some people _are_ having a voice chat, it's difficult to identify who is talking with who, so that you know which other cameras you should open to follow both sides of the discussion. * Cross talk, if different voice chats are happening simultaneously with party members who don't all overlap with each other. In practice, most people just keep their mic muted. This feature idea is to find a way to support smaller group voice chats better. ## The Idea On the Channels list on the left side of the chat room, there should be a "Video Channels" section which lists smaller breakout rooms (including the avatars of the people in each room). Clicking into one of those rooms should prompt you to activate your camera, and put you on a group video call with all the participants of the room. * Each room would have a max capacity limit (configurable in settings.toml), such as 10 or 12 people max. * The settings.toml could define a list of default rooms to start with, which would always be visible. * Users can create their own breakout rooms in case the existing ones are all full. When a user is in a breakout room: * Their camera must be on, and they are on a video call with all other members of the room. * Their camera is NOT available to watch for people in the general chat room channels. * They can ONLY watch the cameras of their breakout room partners, not other cameras on the general chat room. * They can only reside in one breakout room at a time. ## Implementation The following changes would need to be made to support this feature: ### Backend: WebSocket Subscriber The Subscriber object would need a field added for `VideoChannel (string)` holding onto the channel ID of the breakout room they are in. If the value is empty, they are not in a breakout room (default). ### Backend: Breakout Rooms The backend server would need a struct to store the current state of all the breakout rooms: * A channel ID (string) * List of participants in the channel (usernames []string) ### Backend: Protocol Messages Protocol messages for the WebSocket should be added: * Breakout Room Status: this should be like a Who's Online list broadcast that pushes out the complete state of the current breakout rooms. Their names/channel IDs, participants list, etc. * Join Breakout Room: the client should send this message to the server when they confirm to join the room. The server should validate that the client's video status is active before allowing them in. The server should update the Breakout Rooms struct, set the Subscriber.VideoChannel string to match, and broadcast the Breakout Room Status to everybody. Maybe: a server side message confirming that the Join Breakout Room was successful. ### Backend: Who's Online List When the Who's Online list is broadcast out: Users who are on webcam and who are _also_ in a breakout room: they should not send their Video Flag to the general population, so their webcam will appear offline and the gen pop can't watch their camera. Likewise: if a user is in a breakout room, they do not receive the Video Flag from other chatters who are outside the room, only the flag for members of their breakout room. #### Frontend UI Since the frontend is where WebRTC logic happens, it would need some changes to support the feature. * When the user clicks on a breakout room from the left panel channel list: A screen should appear explaining what a breakout room is, listing the current members of the room and prompting the user whether they want to join the room. If they want to join, their camera needs to be activated first and only when it has been activated are they put into the room. If they are already in another breakout room, the prompt should be worded that they will switch to the new room if they confirm. * While the user is in a breakout room: The Who's Online list will only send video flags for the other participants of the room. The chat page should automatically open all of those cameras, while sending the current user's video on the offer, to establish the two-way video calls with each member. If a video connection with another member fails, the page should automatically try again a couple of times. * Breakout rooms can also have a text chat channel. When the user is IN the room, show a chat history screen as normal. * If the user turns off their webcam: remove them from the breakout room. ### Errors/Edge Cases * Webcam boots: they should be waived/ignored while a user is in the breakout room. If you booted somebody off your camera before, and you both join a breakout room, you will see each other's cameras again. No option to boot people while in a breakout room. * Auto-remove users from rooms if their webcam can't be connected to. Usually, if one person is on a poor network and nobody can open their camera, also that person can not open anybody else's camera in turn. In this case, for the affected person who can't connect to anybody in the room, they should automatically leave the room with a relevant error message. From the other side/for safety: maybe user pages can report to the server when they aren't able to load That One Person's camera. If the consensus is that nobody can load the camera, that person should be removed from the room.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: apps/BareRTC#55
No description provided.