Esempio n. 1
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");
        }
Esempio n. 2
0
        public async Task SystemStartup()
        {
            Console.WriteLine("SystemStartup task");
            if (!Source.Enabled)
            {
                Source = await Camera.CreateAsync(SystemConfiguration.VideoDeviceSettings);
            }
            SignalingMechanism = new WebSocketSignaling(this, SystemConfiguration.SignalingURL, SystemConfiguration.WebSocketTokens);

            Connection = await WebRTCPeerCreator.InitializePeerConnection();

            WebRTCPeerCreator.AddVideoTransceiver(Connection, Source);

            ClientCell = new UserCell(this);
            Connection = WebRTCPeerCreator.BindPeerWithController(Connection, this);
        }