public bool SetConfiguration(Abstraction.RTCConfiguration configuration) { var result = _peerConnection.SetConfiguration(configuration.ToNative()); if (result) { Configuration = configuration; } return(result); }
public IPeerConnection CreatePeerConnection(Abstraction.RTCConfiguration configuration, IPeerConnectionListener peerConnectionListener) { var rtcConfiguration = configuration.ToNative(); var constraints = new RTCMediaConstraints(null, new NSDictionary <NSString, NSString>(new NSString("DtlsSrtpKeyAgreement"), new NSString(configuration.EnableDtlsSrtp ? "false" : "true"))); var peerConnectionDelegate = new PeerConnectionListenerProxy(peerConnectionListener); var peerConnection = _factory.PeerConnectionWithConfiguration(rtcConfiguration, constraints, peerConnectionDelegate); return(peerConnection == null ? null : new PeerConnectionNative(peerConnection, configuration, this, peerConnectionDelegate)); }