Avaya Client SDK

< Back to Package Overview

Moderator controls

Using the Avaya Client SDK, you can implement moderator controls for conferences. To use moderator controls, you must create and start a conference call (see the Developing Conferencing Applications page for details).

Become a moderator

The conference may provide an audio prompt to input the participant’s or moderator’s code to join the conference. The user can pass this information by sending DTMFs. To enter digits, call the sendDigit method on the CSCall object.

[call sendDigit: DTMF_digit];

To recognize whether a local participant is a moderator, use the moderationCapability capability exposed by the CSConference class.

if (!call.conference.moderationCapability.allowed) 
{
   NSLog(@"Moderator controls are not available");
}

The moderator has full control of the conference and can assign roles to participants. The full list of moderator capabilities is available from the CSConference class. For more details, see the Developing Conferencing Applications page.

Enable/disable the lecture mode

To check if the user can enable or disable the lecture mode, use the updateLectureModeCapability capability exposed by the CSConference class.

if (!call.conference.updateLectureModeCapability.allowed) 
{
   NSLog(@"Lecture mode can't be changed");
}

To enable or disable the lecture mode, use the setLectureModeActive method and implement the completionHandler to obtain the result.

void (^completionHandler)(NSError *error) = ^(NSError *error) {
    if (error) {
        NSLog(@"Failed to change conference lecture mode:\n%ld-%@",
            (long)error.code, error.localizedDescription);
    }
    else {
        NSLog(@"Successfully changed conference lecture mode.");
    }
};

[call.conference setLectureModeActive: isChecked 
                    completionHandler: completionHandler];
}

The <CSConferenceDelegate> delegate provides the conference:didChangeLectureModeStatus: callback notification that can be used to determine if the lecture mode is enabled or disabled.

- (void)        conference:(CSConference*)conference 
didChangeLectureModeStatus:(BOOL)active {
    NSLog(@"%s", @"didChangeLectureModeStatus");
}

Mute all participants

The moderator can mute audio for all participants of the conference. To check if the mute all feature is allowed, use the muteAllParticipantsCapability capability exposed by the CSConference class.

if (!call.conference.muteAllParticipantsCapability.allowed) 
{
   NSLog(@"Mute all is not available");
}

To mute all the participants, use the muteAllParticipantsWithCompletionHandler: method of the CSConference object.

[call.conference muteAllParticipantsWithCompletionHandler:^(NSError *error) {
    if (error) {
        NSLog(@"Failed to mute all participants:\n%ld-%@",
        (long)error.code, error.localizedDescription);
    } else {
        NSLog(@"Participants successfully muted.");
    }
}];

The <CSActiveParticipantDelegate> delegate provides the activeParticipant:didChangeAudioStatus: callback notification that can be used to determine if the lecture mode is enabled or disabled.

- (void)   activeParticipant:(CSActiveParticipant *)participant
        didChangeAudioStatus:(CSParticipantMediaStatus)newStatus {
    NSLog(@"didChangeAudioStatus");
}