Skip to content

Commit

Permalink
Configurable max number of breakout rooms
Browse files Browse the repository at this point in the history
Use this wisely: breakoutRoomLimit parameter was introduced to controll max number of breakout rooms.
  • Loading branch information
mvasylenko authored and pedrobmarin committed Sep 10, 2020
1 parent 0c72076 commit 7ba421c
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 6 deletions.
Expand Up @@ -6,11 +6,14 @@ import { extractCredentials } from '/imports/api/common/server/helpers';
export default function createBreakoutRoom(rooms, durationInMinutes, record = false) {
const REDIS_CONFIG = Meteor.settings.private.redis;
const CHANNEL = REDIS_CONFIG.channels.toAkkaApps;
const BREAKOUT_LIM = Meteor.settings.public.app.breakoutRoomLimit;
const MIN_BREAKOUT_ROOMS = 2;
const MAX_BREAKOUT_ROOMS = BREAKOUT_LIM > MIN_BREAKOUT_ROOMS ? BREAKOUT_LIM : MIN_BREAKOUT_ROOMS;

const { meetingId, requesterUserId } = extractCredentials(this.userId);

const eventName = 'CreateBreakoutRoomsCmdMsg';
if (rooms.length > 8) return Logger.info(`Attempt to create breakout rooms with invalid number of rooms in meeting id=${meetingId}`);
if (rooms.length > MAX_BREAKOUT_ROOMS) return Logger.info(`Attempt to create breakout rooms with invalid number of rooms in meeting id=${meetingId}`);
const payload = {
record,
durationInMinutes,
Expand Down
Expand Up @@ -109,8 +109,9 @@ const intlMessages = defineMessages({
},
});

const BREAKOUT_LIM = Meteor.settings.public.app.breakoutRoomLimit;
const MIN_BREAKOUT_ROOMS = 2;
const MAX_BREAKOUT_ROOMS = 8;
const MAX_BREAKOUT_ROOMS = BREAKOUT_LIM > MIN_BREAKOUT_ROOMS ? BREAKOUT_LIM : MIN_BREAKOUT_ROOMS;

const propTypes = {
intl: intlShape.isRequired,
Expand Down
Expand Up @@ -117,11 +117,12 @@ input[type="number"]::-webkit-outer-spin-button, input[type="number"]::-webkit-i
}

.boxContainer {
height: 50vh;
display: grid;
grid-template-columns: 1fr 1fr 1fr;
grid-template-rows: 33% 33% 33%;
grid-template-columns: repeat(3, minmax(4rem, 16rem));
grid-template-rows: repeat(auto-fill, minmax(4rem, 8rem));
grid-gap: 1.5rem 1rem;
box-sizing: border-box;
padding-bottom: 1rem;
}

.changeToWarn {
Expand Down
Expand Up @@ -258,7 +258,7 @@ class BreakoutRoom extends PureComponent {
>
<div className={styles.content} key={`breakoutRoomList-${breakout.breakoutId}`}>
<span aria-hidden>
{intl.formatMessage(intlMessages.breakoutRoom, breakout.sequence.toString())}
{intl.formatMessage(intlMessages.breakoutRoom, { 0: breakout.sequence })}
<span className={styles.usersAssignedNumberLabel}>
(
{breakout.joinedUsers.length}
Expand Down
4 changes: 4 additions & 0 deletions bigbluebutton-html5/private/config/settings.yml
Expand Up @@ -29,6 +29,10 @@ public:
allowFullscreen: true
remainingTimeThreshold: 30
remainingTimeAlertThreshold: 1
# Warning: increasing the limit of breakout rooms per meeting
# can generate excessive overhead to the server. We recommend
# this value to be kept under 12.
breakoutRoomLimit: 8
defaultSettings:
application:
animations: true
Expand Down

0 comments on commit 7ba421c

Please sign in to comment.