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