public IPeerConnection PeerConnectionWithConfiguration(Core.RTCConfiguration configuration, MediaConstraints constraints, IPeerConnectionDelegate peerConnectionDelegate)
        {
            var _configuration = configuration.ToPlatformNative();
            var _constraints   = new RTCMediaConstraints(null,
                                                         new NSDictionary <NSString, NSString>(new NSString("DtlsSrtpKeyAgreement"),
                                                                                               new NSString(configuration.EnableDtlsSrtp ? "false" : "true")));
            var _peerConnection = _peerConnectionFactory.PeerConnectionWithConfiguration(_configuration, _constraints, new PlatformPeerConnectionDelegate(peerConnectionDelegate));

            return(_peerConnection == null ? null : new PlatformPeerConnection(_peerConnection, configuration, this));
        }
Esempio n. 2
0
        public IPeerConnection PeerConnectionWithConfiguration(Core.RTCConfiguration configuration, Core.MediaConstraints constraints, IPeerConnectionDelegate peerConnectionDelegate)
        {
            var _configuration  = configuration.ToPlatformNative();
            var _constraints    = constraints.ToPlatformNative();
            var _peerConnection = _peerConnectionfactory.CreatePeerConnection(_configuration, new PlatformPeerConnectionDelegate(peerConnectionDelegate));

            if (_peerConnection == null)
            {
                return(null);
            }
            return(new PlatformPeerConnection(_peerConnection, configuration, this));
        }
Esempio n. 3
0
 public bool SetConfiguration(Core.RTCConfiguration configuration) => _peerConnection.SetConfiguration(config: configuration.ToPlatformNative());