コード例 #1
0
 private void InvokePartConversationParticipantRemoved(ParticipantItem participant)
 {
     foreach (var part in _conversationParts)
     {
         part.ConversationParticipantRemovedInternal(participant);
     }
 }
コード例 #2
0
        private void ChangeMute(ParticipantItem participantItem)
        {
            var participant = participantItem.Participant;

            var ismute = participantItem.IsMute;

            //avModality.BeginSetProperty(
            //	ModalityProperty.AVModalityAudioCaptureMute
            //	, !ismute
            //	, (am) => { avModality.EndSetProperty(am); }
            //	, avModality
            //	);
            try
            {
                if (participant.CanBeMuted())
                {
                    participant.BeginSetMute(
                        !ismute
                        , (pa) => { participant.EndSetMute(pa); }
                        , participant
                        );
                }
            }
            catch (Exception exp)
            {
                _log.ErrorException("ChangeMute", exp);
            }
        }
コード例 #3
0
        private void InitParticipant(ParticipantItem participant)
        {
            var partAVModality = (AVModality)participant.Participant.Modalities[ModalityTypes.AudioVideo];

            partAVModality.ActionAvailabilityChanged += OnParticipantActionAvailabilityChanged;
            partAVModality.ModalityStateChanged      += OnParticipantModalityStateChanged;

            var partVideoChannel = partAVModality.VideoChannel;

            partVideoChannel.StateChanged += OnParticipantVideoChannelStateChanged;


            if (participant.Participant.IsSelf)
            {
                var localpPartAVModality = (AVModality)participant.Participant.Modalities[ModalityTypes.AudioVideo];

                participant.AVModality   = partAVModality;
                participant.VideoChannel = partVideoChannel;


                LocalParticipantVideoModel = participant;
            }

            else
            {
                if (_avModality.CanInvoke(ModalityAction.Connect))
                {
                    Connect();
                }

                participant.AVModality   = partAVModality;
                participant.VideoChannel = partVideoChannel;
            }
        }
コード例 #4
0
        /// <summary>
        /// Handles the event raised when a particpant is removed from the conversation.
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        internal override void ConversationParticipantRemovedInternal(ParticipantItem participant)
        {
            //get the application sharing modality of the removed participant out of the class modalty dicitonary
            ApplicationSharingModality removedModality = participant.ApplicationSharingModality;

            //Un-register for modality events on this participant's application sharing modality.
            removedModality.ActionAvailabilityChanged -= OnSharingModalityActionAvailabilityChanged;
        }
コード例 #5
0
 public void AddItem(ParticipantItem participantItem)
 {
     ParticipantItems.Add(participantItem);
     if (participantItem.Participant.IsSelf)
     {
         CurrentParticipantItem = participantItem;
     }
 }
コード例 #6
0
        private void InitParticipant(ParticipantItem participant)
        {
            base.ConversationParticipantAddedInternal(participant);

            ApplicationSharingModality participantSharingModality = (ApplicationSharingModality)participant.Participant.Modalities[ModalityTypes.ApplicationSharing];

            participant.ApplicationSharingModality = participantSharingModality;

            //register for important events on the application sharing modality of the new participant.
            participantSharingModality.ActionAvailabilityChanged += OnParticipantSharingModalityActionAvailabilityChanged;
            participantSharingModality.ModalityStateChanged      += OnParticipantSharingModalityModalityStateChanged;


            try
            {
                //Is this added participant the local user?
                if (participant.Participant.IsSelf)
                {
                    //Store the application sharing modality of the local user so that
                    //the user can request or release control of a remotely owned and shared resource.
                    _LocalParticipantSharingModality = (ApplicationSharingModality)participant.Participant.Modalities[ModalityTypes.ApplicationSharing];

                    //Enable or disable the Start Resource Sharing button according to the role of the local participant.
                    //Roles can be Presenter or Attendee.

                    if (participant.Participant.Properties[ParticipantProperty.IsPresenter] != null)
                    {
                    }
                    //Register for the particpant property changed event to be notified when the role of the local user changes.
                    participant.Participant.PropertyChanged += OnParticipantPropertyChanged;
                }
                else
                {
                }
            }
            catch (ArgumentException ae)
            {
                _log.ErrorException("argument exception: ", ae);
            }
        }
コード例 #7
0
 /// <summary>
 /// Handles the participant added event. Registers for events on the application sharing modality for the
 /// </summary>
 /// <param name="sender"></param>
 /// <param name="e"></param>
 internal override void ConversationParticipantAddedInternal(ParticipantItem participant)
 {
     InitParticipant(participant);
 }
コード例 #8
0
        internal ParticipantItem Remove(ParticipantItem participant)
        {
            ParticipantItems.Remove(participant);

            return(participant);
        }
コード例 #9
0
 internal virtual void ConversationParticipantRemovedInternal(ParticipantItem participant)
 {
 }