private RTCPeerConnection(RTCConfiguration configuration) //=> { var x = configuration.ToNative(); NativeObject = WebRTCme.WebRtc.NativePeerConnectionFactory .CreatePeerConnection(x, this); }
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)); }
public bool SetConfiguration(RTCConfiguration configuration) { var result = _peerConnection.SetConfiguration(configuration.ToNative()); if (result) { Configuration = configuration; } return(result); }
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 }
public void SetConfiguration(RTCConfiguration configuration) => ((Webrtc.RTCPeerConnection)NativeObject).SetConfiguration(configuration.ToNative());