Mute Unmute Lync SDK



Setting Mute/Unmute State on Lync through Lync SDK:

UnMute:

                           Conversation conv; //Once you have the conversation, set the unmute on Lync as below.

 IDictionary<ModalityTypes, Modality> modalities = conv.Modalities;
Modality mod = modalities[ModalityTypes.AudioVideo];
bool canHold = mod.CanInvoke(ModalityAction.Hold);
//Check if we can invoke Hold on the conversation.
if (canHold)
mod.BeginSetProperty(ModalityProperty.AVModalityAudioCaptureMute, false,UnMuteOccured, null);
 
 
Mute: Mute is simple as mentioned below.
 
conv.SelfParticipant.BeginSetMute(true,MuteOccured, null);
 
 
 
private void UnMuteOccured(IAsyncResult ar){}
private void MuteOccured(IAsyncResult ar){}
 
 
 

Comments

  1. This comment has been removed by the author.

    ReplyDelete
  2. Hello Sudheer i want to mute the microphone of all the participant excepting one in a video conferencing.i am using automation class to implement the video conferencing.
    My code is following

    automation = LyncClient.GetAutomation();
    if (automation != null)
    {
    Dictionary conversationSettings = new Dictionary();
    AutomationModalities conversationModes = AutomationModalities.Audio;
    List participants = new List(2);
    participants.Add("test@lokseva.gov.in");
    participants.Add("test2@lokseva.gov.in");


    try
    {
    // Make the call.
    automation.BeginStartConversation(conversationModes, participants, conversationSettings,
    StartConversationCallback, null);
    }
    catch (LyncClientException lyncClientException)
    {
    Response.Write(lyncClientException.Message);
    }
    }

    Please provide me a solution so i can achieve my requirement in this peace of code.
    Thank u very much.

    ReplyDelete

Post a Comment

Popular posts from this blog

Network Security: LAN manager authentication level

Cisco AnyConnect Secure Mobility Client - VPN service not available. The VPN agent service is not responding