コード例 #1
0
        public void UpdateVideoWindow(VideoChannel videoChannel, VideoWindow videoWindow, bool isCapture)
        {
            var item = ParticipantItems.Where(p => p.IsMatch(videoChannel)).SingleOrDefault();

            if (item != null)
            {
                if (isCapture)
                {
                    if (item.CaptureVideoWindow == null)
                    {
                        item.CaptureVideoWindow             = videoWindow;
                        item.CaptureVideoWindowOriginHeight = videoWindow.Height;
                        item.CaptureVideoWindowOriginWidth  = videoWindow.Width;
                    }
                }
                else
                {
                    if (item.RenderVideoWindow == null)
                    {
                        item.RenderVideoWindow             = videoWindow;
                        item.RenderVideoWindowOriginHeight = videoWindow.Height;
                        item.RenderVideoWindowOriginWidth  = videoWindow.Width;
                    }
                }
            }
        }
コード例 #2
0
 public void AddItem(ParticipantItem participantItem)
 {
     ParticipantItems.Add(participantItem);
     if (participantItem.Participant.IsSelf)
     {
         CurrentParticipantItem = participantItem;
     }
 }
コード例 #3
0
        internal ParticipantItem GetItem(string id)
        {
            var item = ParticipantItems.Where(p => p.Id == id).SingleOrDefault();

            if (item == null)
            {
                return(null);
            }
            return(item);
        }
コード例 #4
0
        internal ParticipantItem GetItem(VideoChannel channel)
        {
            var item = ParticipantItems.Where(p => p.IsMatch(channel)).SingleOrDefault();

            if (item == null)
            {
                return(null);
            }
            return(item);
        }
コード例 #5
0
        internal ParticipantItem Remove(string uri)
        {
            var removeItem = ParticipantItems.Where(p => p.Id == uri).SingleOrDefault();

            if (removeItem == null)
            {
                return(null);
            }
            ParticipantItems.Remove(removeItem);

            return(removeItem);
        }
コード例 #6
0
        internal ParticipantItem Remove(ParticipantItem participant)
        {
            ParticipantItems.Remove(participant);

            return(participant);
        }
コード例 #7
0
 public void Clear()
 {
     ParticipantItems.Clear();
 }