0

I'm trying to put a conversation on fullscreen mode when someone shares it's camera, but i don't know what event handler should i be subscribed. Right now i'm subscribed to this event handlers:

AVModality.StreamStateChanged += AV_StreamStateChanged;
AVModality.ModalityStateChanged += AVModality_ModalityStateChanged;
VideoChannel.StateChanged += VideoChannel_StateChanged;
John Saunders
  • 160,644
  • 26
  • 247
  • 397

1 Answers1

0

Try VideoChannel.StateChangedevent. This event is under Conversation.ParticipantAdded event.

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 can be used for listening channelstate enum. The details of enum can be found here.

Also have a look at this link. It uses Lync SDK 2010, but still looks to be quite relevant.

Ankit Vijay
  • 3,752
  • 4
  • 30
  • 53