有人分享相机时的全屏对话

时间:2015-04-23 22:03:30

标签: lync lync-client-sdk

当有人分享它的相机时,我正试图在全屏模式下进行对话,但我不知道应该订阅什么样的事件处理程序。现在我订阅了这个事件处理程序:

AVModality.StreamStateChanged += AV_StreamStateChanged;
AVModality.ModalityStateChanged += AVModality_ModalityStateChanged;
VideoChannel.StateChanged += VideoChannel_StateChanged;

1 个答案:

答案 0 :(得分:0)

尝试VideoChannel.StateChanged事件。此活动位于Conversation.ParticipantAdded活动。

this.Conversation.PaticipantAdded += this.Conversation_ParticipantAdded;

private void Conversation_ParticipantAdded(object sender, ParticipantCollectionChangedEventArgs e) {
    if (e.Participant.IsSelf) {
    }
    else {
      var avModality = e.Participant.Modalities[ModalityTypes.AudioVideo] as AVModality;
      avModality.VideoChannel.StateChanged += this.ClientParticipant_VideoChannel_StateChanged;
    }
}

private void ClientParticipant_VideoChannel_StateChanged(object sender, ChannelStateChangedEventArgs e) {
 //Look for e.NewState
}

e.NewState可用于监听channelstate枚举。枚举的详细信息可以在here找到。

另请查看this link。它使用Lync SDK 2010,但看起来仍然非常相关。