Mesibo Group Management - Creating a Group
You can create a new group by calling createGroup
API. It will send a request to the server to create a new group. When a group is created, Mesibo_onGroupCreated
callback function in the listener will be called with the group profile. You can then add members to the group using group profile APIs. Note that, you will be already added as the owner and the member of the group and hence you should not add yourself again.
boolean createGroup(MesiboGroupSettings settings, GroupListener listener)
boolean createGroup(String name, long flags, GroupListener listener)
createGroup
takes the following parameters:
Parameter | Description |
---|---|
settings | Group settings object |
name | Name of the group |
flags | Group flags, you can pass 0 unless you have specific requirements as mentioned below |
listener | listener which will be called when group is created (explained later). Note that, if you are using Javascript, you can pass listener or a callback function. For all other platforms, it is the listener. |
Group settings class MesiboGroupSettings
has following members:
Member | Description |
---|---|
name | Name of the group |
flags | Group flags, you can pass 0 unless you have specific requirements as mentioned below |
callFlags | Group Call Flags, default 0 |
videoResolution | Group Call video resolution, default MESIBO_RESOLUTION_DEFAULT |
callDuration | Maximum call duration, default 0 for no restrictions on the call duration |
listener | listener which will be called when group is created (explained later). Note that, if you are using Javascript, you can pass listener or a callback function. For all other platforms, it is the listener. |
Group Flags can be a logical OR
combination of one or more flags value below:
Flag | Description |
---|---|
0 | Normal group, only members can send and receive, and participate in the conference |
MESIBO_GROUPFLAG_SENDBYSELECTED | Only selected members can send (refer add members API below) |
MESIBO_GROUPFLAG_SENDBYANYONE | Anyone can send |
MESIBO_GROUPFLAG_RECVBYSELECTED | Only selected members can receive (refer add members API below) |
MESIBO_GROUPFLAG_RECVROUNDROBIN | Received by one member in the round-robin fashion |
MESIBO_GROUPFLAG_NOSTORAGE | Do no store group messages |
MESIBO_GROUPFLAG_PUBBYSELECTED | Only selected members can publish their streams (video/audio) to the conference (refer to the conference APIs to learn more) |
MESIBO_GROUPFLAG_PUBBYANYONE | Anyone can publish their streams to the conference (refer to the conference APIs to learn more) |
MESIBO_GROUPFLAG_SUBBYSELECTED | Only selected members can subscribe (view/listen) to streams in the conference (refer to the conference APIs to learn more) |
MESIBO_GROUPFLAG_SUBBYANYONE | Anyone can subscribe (view/listen) to streams in the conference (refer to the conference APIs to learn more) |
MESIBO_GROUPFLAG_LISTBYSELECTED | Only selected members can get the list of streams in the conference (refer to the conference APIs to learn more) |
MESIBO_GROUPFLAG_LISTBYANYONE | Anyone can get the list of streams in the conference (refer to the conference APIs to learn more) |
In Java,
MesiboGroupProfile.GroupSettings settings = new MesiboGroupProfile.GroupSettings();
settings.name = "My Group";
settings.flags = 0;
Mesibo.createGroup(settings, this);
In Kotlin
var settings:MesiboGroupProfile.GroupSettings = MesiboGroupProfile.GroupSettings()
settings.name = "My Group"
settings.flags = 0
Mesibo.createGroup(settings, this)
In Objective-C,
MesiboGroupSettings *settings = [MesiboGroupSettings new];
settings.name = @"My Group";
settings.flags = 0;
[MesiboInstance createGroup:settings listener:self];
In Swift,
let settings:MesiboGroupSettings = MesiboGroupSettings();
settings.name = "My Group";
settings.flags = 0;
Mesibo.getInstance().createGroup(settings, listener: self)
In Javascript
var settings = {};
settings.name = "My Group";
settings.flags = 0;
Mesibo.createGroup(settings, function(p) {
});