我正在尝试在 UI 抑制模式下使用 Lync SDK 构建会议应用程序,该应用程序接近 lync 中的即时会议功能,以便一个用户将他的视频/音频发送给对话中的所有其他用户,我的代码是:
// Add conversation using
_LyncClient.ConversationManager.AddConversation();
// When Conversation added add participants
// User 1 will broadcast video/audio
_Conversation.AddParticipant(_LyncClient.ContactManager.GetContactByUri(user1));
// User 2 and User 3 will only recieve audio video
_Conversation.AddParticipant(_LyncClient.ContactManager.GetContactByUri(user2));
_Conversation.AddParticipant(_LyncClient.ContactManager.GetContactByUri(user3));
// Start the audio call from user1 machine
avModality.BeginConnect(AVCallback);
// When recieve the call in user2, user 3 stop mic using mute
_Conversation.SelfParticipant.BeginSetMute(true, (ar) =>
{
_Conversation.SelfParticipant.EndSetMute(ar);
}, _Conversation.SelfParticipant);
// and same technique for video
它有效,但我注意到每次用户进入对话时呼叫的性能都会受到影响,并且对话会进入 Hold 然后 Retrive 状态,直到添加用户。
如何以一种方式开始通话,只发送(不发送接收),我尝试了以下方法:
avModality.BeginConnect(AVCallback, ChannelState.Send);
但它没有用,我也查看了Conversation Properties,Moadilty Properties 但没有任何帮助。
我发现唯一相关的是avModality.AudioChannel.State但我找不到设置此属性的方法?
任何人都可以帮忙吗?