Пример #1
0
        public static WebCam GetInstance()
        {
            if (_instance == null || _video_end_point == null)
            {
                _instance = new WebCam();
            }

            return(_instance);
        }
Пример #2
0
        public WebRTCPeer()
        {
            // Creating logger
            logger = CreateLogger();

            // Create camera instance
            camera = WebCam.GetInstance();


            // Create websocket for connection to signaling server
            signaling = new WebSocketSharp.WebSocket(signaling_url);
            signaling.Connect();
            AddActionsToSignalingWebSocket();

            // Create Microcontroller instance
            //controller = Microcontroller.Create(logger);

            // Creating RTCPeerConnection
            pc = BuildRTCPeerInstance();
            AddActionsToRTCPeer();
            AddWebCamVideoTrack();
        }