Пример #1
0
 public void PeerConnectionDisconnected(object sender, string message)
 {
     Console.WriteLine("User disconnected");
     Console.WriteLine("Here can working async compucting");
     ClientCell.RemoveRemoteControlling(Connection);
     Source.I420AVideoFrameReady += WritingVideo;
     UserDisconnected             = true;
     RestartTimer.Start();
 }
Пример #2
0
 public void PeerConnected(object sender, string message)
 {
     Console.WriteLine("User connected");
     Console.WriteLine("Here stop working async compucting");
     Source.I420AVideoFrameReady -= WritingVideo;
     ClientCell.AddRemoteControlling(Connection);
     UserDisconnected = false;
     RestartTimer.Stop();
 }
Пример #3
0
        public async Task PeerConnectionClosed(object sender, string message)
        {
            Console.WriteLine("Peer Connection Was Disposed...");
            if (!Source.Enabled)
            {
                Source = await Camera.CreateAsync(SystemConfiguration.VideoDeviceSettings);
            }
            ClientCell?.RemoveRemoteControlling(Connection);
            Connection = await WebRTCPeerCreator.InitializePeerConnection();

            Connection = WebRTCPeerCreator.AddVideoTransceiver(Connection, Source);
            Connection = WebRTCPeerCreator.BindPeerWithController(Connection, this);
            Console.WriteLine("End of rebuilding peer connection");
        }