Mesibo Video & Voice Conferencing

Conference Admin and Moderation

{% include_relative nav.html selected="admin" %}

In this section, we will learn about conference room administration. The group owners and admins can perform various admin tasks using Admin API, depending on the admin permissions. For example,

  • mute or unmute participants
  • ask participants to publish voice and video streams on demand
  • ask participants to stop publishing without leaving the room
  • ask participants to view/subscribe to a particular publisher
  • ask participants to leave the room
  • ask participants to view streams in full screen
  • make other participants admin
  • etc.

To administer or moderate a conference room, one needs to be an owner or an admin of the room. Refer to the Real-time Group Management APIs to learn about how to add admins to the group.

Prerequisites

Before we dive into the administration, you MUST have completed previous sections and successfully build an app with mesibo conferencing APIs.

Conference Admin Class and Admin Listener

Administrating a room is as simple as getting an instance of Admin Class and performing the required operation on it. There are two types of admin operations,

  • Participant level administration to administer/moderate a particular participant, for example, to mute or hang up a participant.
  • Group Level administration to administer/moderate the entire room.

When an admin action is initiated, one of the GroupCallAdminListener functions will be invoked at the receiver side to carry out the act. For example, if the admin initiates muting of a participant by calling the mute() function of an admin object, the MesiboGroupcallAdmin_OnMute will be instantly invoked at the participant side. Your app needs to implement GroupCallAdminListener to achieve admin functionalities. Refer to the GroupCallAdminListener to learn how to implement it.

We will now explain the Participant level administration and then explain Group Level administration.

Participant level Administration

To admin a participant, you need to access Participant Admin Object MesiboParticipantAdmin by calling getAdmin() API of the Participant object. The getAdmin() API returns MesiboParticipantAdmin object only if the caller has admin permissions, if not, it returns a null object. Once you have the admin object, you can perform any admin operation on it.

For example, the following code mutes a participant.


MesiboCall.MesiboParticipantAdmin admin = participant.getAdmin();
if(null == admin) return;

// audio mute this participant
status = admin.toggleAudioMute();
MesiboParticipantAdmin *admin = [participant getAdmin];
if(!admin) return;

// audio mute this participant
[admin toggleAudioMute];
var admin = participant.getAdmin();
if(!admin) return;

// audio mute this participant
admin.toggleAudioMute();

MesiboParticipantAdmin Methods

The following are the methods in MesiboParticipantAdmin

mute

Mute or unmute voice and/or video of a participant

It takes the following parameters:

  • audio, audio mute/unmute operation
  • video, video mute/unmute operation
  • enable, Pass true to mute, false to unmute.

For example, in Android and Javascript, to mute audio

admin.mute(true, false, true)

toggleVideoMute

Toggle mute the video. That is, unmute the video if it is muted and mute it otherwise. While publishing, it stops video capture through the camera or screen, if the video is muted.

It does not take any parameters.

For example, in Android and Javascript,

admin.toggleVideoMute();

In iOS,

[admin toggleVideoMute];

toggleAudioMute

Toggle mute the audio. That is, unmute the audio if it is muted and mute it otherwise.

It does not take any parameters.

For example, in Android and Javascript,

admin.toggleAudioMute();

In iOS,

[admin toggleAudioMute];

hangup

Stop publishing or viewing the stream.

It does not take any parameters.

For example, in Android and Javascript,

admin.hangup();

In iOS,

[admin hangup]

publish

requests a participant to start publishing

It takes the following parameters:

  • sid, stream ID
  • audio, true to publish audio, false otherwise
  • video, true to publish video, false otherwise
  • source, video source (front or back camera, screen, etc)
  • index, camera index

For example, In iOS,

[admin publish:0 source:MESIBOCALL_VIDEOSOURCE_CAMERADEFAULT index:0 audio:YES video:YES]l

subscribe

requests a participant to subscribe to a particular publisher

It takes the following parameters:

  • participant, Participant object of the publisher
  • audio, true to subscribe to the audio stream, false otherwise
  • video, true to subscribe to the video stream, false otherwise

For example, In iOS,

[admin publish:0 source:MESIBOCALL_VIDEOSOURCE_CAMERADEFAULT index:0 audio:YES video:YES]l

Group level Administration

The group-level administration is the same as participant administration described in the previous section, except that it acts on multiple participants. You need to access Group Call Admin Object MesiboGroupCallAdmin by calling getAdmin() API of the MesiboGroupCall object. The getAdmin() API returns MesiboGroupCallAdmin object only if the caller has admin permissions, if not, it returns a null object. Once you have the admin object, you can perform any admin operation on it.

For example, the following code mutes all the participants using group level adminsitation.


MesiboCall.MesiboGroupCallAdmin admin = groupCall.getAdmin();
if(null == admin) return;

status = admin.muteAll(true, true, true);
MesiboGroupCallAdmin *admin = [groupCall getAdmin];
if(!admin) return;

[admin muteAll:YES video:YES enable:YES];
var admin = participant.getAdmin();
if(!admin) return;

admin.muteAll(true, true, true);

MesiboGroupCallAdmin Methods

The following are the methods in MesiboGroupCallAdmin

mute

Mute or unmute voice and/or video of one or more participants

It takes the following parameters:

  • participants, array of Participant objects
  • audio, audio mute/unmute operation
  • video, video mute/unmute operation
  • enable, Pass true to mute, false to unmute.

muteAll

Mute or unmute voice and/or video of all the participants

It does not take any parameters.

hangup

Hang up one or more participants

It takes the following parameters:

  • participants, array of Participant objects

hangupAll

Hang up all the participants

It does not take any parameters.

fullscreen

Request all the participants to make the video stream of the specified publisher fullscreen

It takes the following parameters:

  • participant, Participant object of the publisher to make fullscreen