title: WebRTC and Asp.NetCore
body: <p>I would like to record the Audio stream from my Angular Web App to my Asp.net Core Api.</p>
  
  <p>I think, using SignalR and its websockets it a good way to do that.</p>
  
  <p>With this typescript code, I m able to get a MediaStream:</p>
  
  <pre><code>import { HubConnection } from '@aspnet/signalr';
  
  [...]
  
  private stream: MediaStream;
  private connection: webkitRTCPeerConnection;
  @ViewChild('video') video;
  
  [...]
  
  navigator.mediaDevices.getUserMedia({ audio: true })
    .then(stream =&gt; {
      console.trace('Received local stream');
      this.video.srcObject = stream;
      this.stream = stream;
  
      var _hubConnection = new HubConnection('[MY_API_URL]/webrtc');
      this._hubConnection.send("SendStream", stream);
    })
    .catch(function (e) {
      console.error('getUserMedia() error: ' + e.message);
    });
  </code></pre>
  
  <p>And I handle the stream in the .NetCore API with </p>
  
  <pre><code>  public class MyHub: Hub{
      public void SendStream(object o)
      {
      }
  }
  </code></pre>
  
  <p>But when I cast o to System.IO.Stream, I got a null.</p>
  
  <p>When I read the documentation of WebRTC, I saw information about RTCPeerConnection. IceConnection ... Do I need that?</p>
  
  <p>How can I stream the audio from a WebClient to Asp.netCore API using SignalR? Documentation? GitHub?</p>
  
  <p>Thanks for your help</p>