当有人共享聊天时,我正在尝试将对话置于全屏模式,但我不知道应该订阅哪个事件处理程序。现在我订阅了这个事件处理程序:
AVModality.StreamStateChanged += AV_StreamStateChanged;
AVModality.ModalityStateChanged += AVModality_ModalityStateChanged;
VideoChannel.StateChanged += VideoChannel_StateChanged;
尝试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
可用于侦听通道状态枚举。枚举的详细信息可以在这里找到。
另请查看此链接。它使用 Lync SDK 2010,但看起来仍然非常相关。