Step 1. Find the conversation.
Conversation c;
Step 2. Find yourself
foreach (Participant p in c.Participants)
{
if (p.IsSelf)
{
Step 3. Mute if not muted
if (!p.IsMuted)
{
p.BeginSetMute(true, rc =>
{
try
{
p.EndSetMute(rc);
}
catch { }
}
, null);
}
Important Note;
The BeginSetMute call takes a Boolean parameter that can be true or false, so you can use it to "un-mute" yourself as well.
That will conclude this weeks blog post. If you have any questions hit me up on twitter.
Doug Routledge, C# Lync, Skype for Business, SQL, Exchange, UC Developer BridgeOC
Twitter - @droutledge @ndbridge
Twitter - @droutledge @ndbridge
No comments:
Post a Comment
Any spam comments will be deleted and your user account will be disabled.