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