Exemplo n.º 1
0
        private void ReceiveWebCam_OnClick(object Sender, RoutedEventArgs E)
        {
            WebCamCast?.Stop();
            AudioChat.Start();
            WebCamCast = new WebCamCast(IPAddress.Parse(Ip.Text));
            ScreenCastWindow scw = new ScreenCastWindow();

            WebCamCast.OnFrameChange += (s) =>
            {
                scw.Dispatcher.Invoke(() =>
                {
                    scw.ScreenCast_OnFrameChange(s);
                });
            };
            scw.Closed += Scw_Closed;
            scw.Show();
            WebCamCast.ReceiveAsync();
        }
Exemplo n.º 2
0
        private void ShareWebCam_OnClick(object Sender, RoutedEventArgs E)
        {
            IsWebCamCasting = !IsWebCamCasting;
            WebCamCast?.Stop();

            if (IsWebCamCasting)
            {
                WebCamCast = new WebCamCast(IPAddress.Parse(Ip.Text));
                AudioChat.Start();
                WebCamCast.SendAsync();
                ShareWebCam.Content     = "Stop";
                ReceiveWebCam.IsEnabled = false;
            }
            else
            {
                AudioChat.Stop();
                ShareWebCam.Content     = "Share WebCam";
                ReceiveWebCam.IsEnabled = true;
            }
        }