public static WebCam GetInstance() { if (_instance == null || _video_end_point == null) { _instance = new WebCam(); } return(_instance); }
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(); }