Mesibo Video Conferencing - Create a Conference Room

Estimated reading time: 12 minutes

In this section, we will learn about a conference room, its permissions, and settings. Then, we will explain how to create a conference room with required permissions & settings and add participants using Mesibo real-time and Backend APIs.

Prerequisites

Before you continue, ensure that you have gone through the following and you are familiar with mesibo APIs.

Conference Room Permissions and Settings

As we discussed in the previous section, a conference room is a mesibo group. The participants are members of a group. To create a conference room, the host essentially needs to create a mesibo group with required permissions & settings and then add participants to it. Let’s first look at the permissions.

Permissions

You can set various permissions at the group and the participant level, for example, who can publish, who can view, who can message, etc. This allows you to create any type of conference room just by setting the right permissions, for example, a meeting room where all participants can participate together, OR a classroom where a teacher is an active participant and others are viewers.

For any conference room, you can set the following permissions:

  • Who can publish: If only selected members can publish streams or anyone in the group can publish
  • Who can view: If only selected members can view streams or anyone in the group can view
  • Who can list: If only selected members can get the list of participants or anyone in the group can get
  • Who can send messages: If only selected members can send messages to the group or anyone in the group can message
  • Who can receive messages: If only selected members can receive messages to the group or anyone in the group can receive

You can further refine permissions by setting them for individual participants which overrides the group level permissions. For example, say a few key members can publish in full-HD and rest in normal resolution, or to restrict a particular participant from sending messages, etc.

  • can Send: If the member can send messages to the group
  • can Receive: If the member can receive messages from the group
  • can Publish: If the member can make (publish) group voice or video calls
  • can Subscribe: If the member can subscribe to group voice or video calls
  • can List: If the member can get a list of active callers in the group
  • can Admin/moderate: If the member can moderate the group, for example, muting some participant, hanging up, etc.

Settings

In addition to permissions, you can also set various properties of the conference like video resolution, allowed media types (video/voice/screen), bandwidth, etc. which we will cover in the later section.

Example of Conference Room Permissions

Here are some examples of different types of permissions you can set for different conferencing scenarios.

Conference / Group Calling

In a conference/group calling app, you require that all the members of the group can publish their stream and can also subscribe to other streams. Also, all the members should be able to get a list of participants who are publishing their streams so that they can subscribe to them. Hence the suggested group setting is as shown below.

conference scenario

Open Webinar / Panel discussion

In an open webinar or panel discussion app, you generally require that only one or selected participants are publishing and the rest are subscribers only. Other members will not be allowed to publish their streams. This can be achieved with the following group permissions

webinar scenario

In the case of a members-only webinar, you can simply change the permission as follows

  • Who can view live streams: Members
  • Who can view stream list: Members

You can also dynamically enable audio or video. For example, in the case of a webinar, someone can ‘raise hand’ to ask a question and you can automatically enable voice for that participant.

Class Room

In a classroom app, the teacher has the control to change the permissions for the students. At the group-level, you can set that only selected members can publish - usually the teachers.

Classroom

The students by default do not have permission to publish. By default, you can mute all the students. The teacher can dynamically set the talking permission for a student when any clarification is needed. You can have this dynamic control, by individual member level permissions.

student in class room

As you can see, you can create any kind of scenario just by setting the right permissions. In the next section, we will learn how to create a conference room.

Creating a Conference Room

There are three ways you can create a conference room and add participants to it.

  • Using mesibo Real-time Group Management APIs. This is the recommended approach. Your apps can create groups at run time. Most mesibo based apps including mesibo open-source messenger use this approach.

  • If you don’t want your users to create groups and instead you prefer to create groups and add members from your backend, you can use Backend Group Management REST APIs

  • Using mesibo console. This approach should be only used during the API exploration and learning phase.

Now we will explain each of the above methods to create a conference room.

You can create a group using real-time Group Management APIs as shown below. The user who created will be marked as the group owner. More owners and admins can be added later if requires.

MesiboGroupProfile.GroupSettings settings = new MesiboGroupProfile.GroupSettings();
settings.name = "My Conference Room";
settings.flags = 0; 
settings.callFlags = MESIBO_GROUPCALLFLAG_VIDEO|MESIBO_GROUPCALLFLAG_AUDIO|MESIBO_GROUPCALLFLAG_TALKING;
settings.videoResolution = MESIBO_RESOLUTION_DEFAULT;

Mesibo.createGroup(settings, listener);

In the above example, we are creating a group with default permissions (members only), default video resolution, and enabling video, audio, and talk detection for the room. When the group is created, the Mesibo_onGroupCreated function in the GroupListener will be called with the group profile which you can use for further operation, for example, adding members.

Refer to the Real-time Group Management APIs for details and more examples and definitions of various permissions, flags, resolution, etc. We also recommend downloading and referring to Conferencing App Source code to learn about API usage in a real-world app.

Using the Backend APIs

You can also create a group using the REST based backend APIs by invoking groupadd operation. To set group-level permissions, for those who can publish and view streams set the group flags(can be a logical OR a combination of one or more flags) as follows:

  • 0x100, Selected can publish
  • 0x200, Anyone can publish
  • 0x1000, Selected can subscribe
  • 0x2000, Anyone can subscribe
  • 0x10000, Selected can get list of participants
  • 0x20000, Anyone can get list of participants
  • 0x00, Default

For example,

https://api.mesibo.com/backend/?op=groupadd&token=xxxxxxxxxxxxx&name=ConferenceGroup&flag=0

This will return the group ID in a JSON response. Make note of this group id. We will use this later to add members to the group

{"group":{"gid":12345},"op":"groupadd","result":true}

Refer to the Backend Group Management REST APIs documentation for more details.

Using the console

Go to mesibo dashboard and choose an application. Click on the Settings icon. Now click on Groups.

To create a new group, click on the + NEW GROUP button. Give a group name - example ConferenceGroup and click on Create. Your group with the name ConferenceGroup should now be created and be displayed in the table. Click on the edit icon, under actions. This will open the Group Settings page where you can configure group-level permissions for who can publish and view streams.

Conference Group Settings

Add Participants

Now, let us add participants as members to the group ConferenceGroup.

Using the Real-time Group Management APIs

You can add members to the group by calling addMember API of the groupProfile. You can also use addMembers API to add multiple members.

MesiboGroupProfile gp = profile.getGroupProfile();

MesiboGroupProfile.MemberPermissions permissions = new MesiboGroupProfile.MemberPermissions();
permissions.flags = MesiboGroupProfile.MEMBERFLAG_ALL;
permissions.adminFlags = 0;
gp.addMember(address, permissions);

In above example, we have added a member with all the permissions but no admin permissions. The user will be notified and can now join the conference.

Using the Backend APIs

Invoke groupeditmembers by passing the GID or group-ID of the group you created in the previous step and a comma-separated list of user addresses.

For each user, set the permissions using the following parameters:

  • cansend = [group messaging] 1 if members being added can send messages, 0 for not
  • canrecv = [group messaging] 1 if members being added can receive messages, 0 for not
  • canpub = [group calling] 1 if members being added can make (publish) group voice or video calls, 0 for not
  • cansub = [group calling] 1 if members being added can subscribe to group voice or video calls, 0 for not
  • canlist = [group calling] 1 if members being added can get a list of active callers in the group, 0 for not
  • delete = 0 to add members, 1 to remove members

For example, In the case of a conference, members can send and receive videos. So we invoke the API as follows. Let’s say you have users with addresses user0, user1, user2, user3, user4 that need to be members of the conference, let all members have permission to publish, subscribe, and list. Invoke the API as follows

https://api.mesibo.com/backend/?op=groupeditmembers&token=xxxxxxxxxxxxx&gid=12345&m=user0,user1,user2,user3,user4&canpub=1&cansub=1&canlist=1&delete=0

If you want to deny certain permission to the user, set the permission to 0. For example, if you do not want a certain participant to publish, set canpub=0.

Using the Console

Click on the + NEW MEMBER button and enter the user address whom you wish to add. Click on Add. The Members table will now display the member you just added. Similarly, add more users.

Add the users created earlier as members of the group in the console. Group Members

If you want to provide participant level permissions in the console, set the group level permissions to Selected. For example, for Who can publish live streams, select the option Selected.

Then, you will be able to check or uncheck the checkbox for Can Publish. Similarly, you can set other participant-level permissions.

Conference Room Settings

In addition to permissions, you can set various properties like resolution, media, bitrate control, etc. for each group.

You can decide the default resolution for the conference room. mesibo supports different conference room resolutions, from normal to 4K. Mesibo has an adaptive algorithm to change the bitrate and resolution depending on the network condition, which is ON by default. However, you can disable it if you like. Note that although you can select the resolution in the console, your camera/device must support that resolution. It is recommended that you enable the resolution that best meets your bandwidth and device capacity.

You can enable default media types (voice or video or both) allowed in your conference room. For example, a normal conference room will have both voice and video. However, you can also create a voice-only room by disabling video. Alternatively, you can only allow subscribers to access video and voice but only allow asking questions using voice.

Similarly, you can enable screen-sharing for participants to share one or more screens during the conference.

Mesibo also allows you to enable simulcast in which each publisher can publish the same stream in different resolutions to cater to subscribers having different bandwidth and devices. Note that enabling simulcast increases CPU and bandwidth usage significantly.

Group Calling Quality

You can override these settings per participant. For example, in your conference, you can make a setting such that only selected members (key speakers) can publish in HD resolution and others in low resolution, and so on.

Quick Start with Conferencing APIs

Now that you are familiar with creating a room using Group Management APIs, we will explore user-facing Conferencing APIs and operations in detail in the upcoming sections. You can choose a platform that you wish and quickly start building!

Quick Start - Android >> Quick Start - iOS >> Quick Start - Javascript >>

conferencing, group calling, live streaming, facebook live, youtube live, screen sharing