コード例 #1
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));
        }
コード例 #2
0
 public void OfferForConstraints(Core.MediaConstraints mediaConstraints, Core.Interfaces.ISdpObserver sdpObserver) => _peerConnection.CreateOffer(new PlatformSdpObserver(sdpObserver), mediaConstraints.ToPlatformNative());
コード例 #3
0
 public IAudioSource AudioSourceWithConstraints(Core.MediaConstraints mediaConstraints) => new PlatformAudioSource(_peerConnectionfactory.CreateAudioSource(mediaConstraints.ToPlatformNative()));
コード例 #4
0
 public static RTCMediaConstraints ToPlatformNative(this Core.MediaConstraints nativePort) => new RTCMediaConstraints(mandatory: nativePort.Mandatory.ToPlatformNative(), optional: nativePort.Optional.ToPlatformNative());