internal void GetRtcConfiguration(Action <PeerConnectionInterface.RtcConfiguration> OnConfiguration)
        {
            var config = new PeerConnectionInterface.RtcConfiguration();

            config.SdpSemantics = SdpSemantics.UnifiedPlan;
            config.Servers      = GetIceServers().ToArray();
            OnConfiguration.Invoke(config);
        }
        public DisposablePeerConnectionInterface CreatePeerConnection(PeerConnectionInterface.RtcConfiguration config, WebRtcPeerConnection observer)
        {
            var dependencies = new PeerConnectionDependencies();

            dependencies.Observer = new DisposablePeerConnectionObserver(observer);

            var pc = factory.CreatePeerConnection(config, dependencies); // keep track of the peerconnections as they must be destroyed before the threads

            pcs.Add(observer);

            return(pc);
        }