Exemplo n.º 1
0
        private RTCPeerConnection(RTCConfiguration configuration) //=>
        {
            var x = configuration.ToNative();

            NativeObject = WebRTCme.WebRtc.NativePeerConnectionFactory
                           .CreatePeerConnection(x, this);
        }
Exemplo n.º 2
0
        public IPeerConnection CreatePeerConnection(RTCConfiguration configuration,
                                                    IPeerConnectionListener peerConnectionListener)
        {
            var nativeConfiguration = configuration.ToNative();
            var peerConnection      = _factory.CreatePeerConnection(nativeConfiguration,
                                                                    new PeerConnectionListenerProxy(peerConnectionListener));

            return(peerConnection == null ? null : new PeerConnectionNative(peerConnection, configuration, this));
        }
Exemplo n.º 3
0
        public bool SetConfiguration(RTCConfiguration configuration)
        {
            var result = _peerConnection.SetConfiguration(configuration.ToNative());

            if (result)
            {
                Configuration = configuration;
            }
            return(result);
        }
Exemplo n.º 4
0
        private RTCPeerConnection(RTCConfiguration configuration)
        {
#if false
            var rtcConfig = new Webrtc.RTCConfiguration();
            rtcConfig.IceServers = new Webrtc.RTCIceServer[]
            {
                new Webrtc.RTCIceServer(new []
                {
                    "stun:stun.stunprotocol.org:3478",
                    "stun:stun.l.google.com:19302"
                })
            };
            var mediaConstraints = new Webrtc.RTCMediaConstraints(null, null);
            NativeObject = WebRTCme.WebRtc.NativePeerConnectionFactory.PeerConnectionWithConfiguration(rtcConfig, mediaConstraints, this);
#endif
#if true
            var nativeConfiguration = configuration.ToNative();
            var nativeConstraints   = new Webrtc.RTCMediaConstraints(null, null); //NativeDefaultRTCMediaConstraints;
            NativeObject = WebRTCme.WebRtc.NativePeerConnectionFactory.PeerConnectionWithConfiguration(
                nativeConfiguration,
                nativeConstraints,
                this);
#endif
        }
Exemplo n.º 5
0
 public void SetConfiguration(RTCConfiguration configuration) =>
 ((Webrtc.RTCPeerConnection)NativeObject).SetConfiguration(configuration.ToNative());