Exemplo n.º 1
0
        ///<summary>
        ///	Present
        /// Presents the window
        ///</summary>
        public void UpdateChatType(ChatType type)
        {
            this.chatType = type;

            switch (chatType)
            {
            default:
            case ChatType.Text:
                // do nothing, text doesn't need to setup streams
                break;

            case ChatType.Audio:
                if (!conv.ActiveAudioStream)
                {
                    Logger.Debug("No active Audio Stream, adding video stream");
                    ShowAudioControl(true);
                    conv.AddAudioChannel();
                    conv.StartAudioStream();
                }
                break;

            case ChatType.Video:
                if (!conv.ActiveVideoStream)
                {
                    Logger.Debug("No active Video Stream, adding video stream");
                    ShowVideoControl(true);
                    conv.AddAudioVideoChannels();
                    conv.StartAudioVideoStreams(videoView.PreviewWindowId, videoView.WindowId);
                }
                break;
            }
        }