title: How to stream live audio from browser to Icecast server
body: <p>Is there a way I can send live audio input from browser to an Icecast server?</p>
  
  <p>I am using <code>getUserMedia</code> API to receive the audio input and I want this to be a live stream to an Icecast server.</p>
  
  <pre><code>getAudioInput(){
    const constraints = { 
      video: false, 
      audio: {deviceId: this.state.deviceId ? {exact: this.state.deviceId} : undefined},
    };
  
    window.navigator.getUserMedia(
      constraints, 
      this.streamAudio, 
      this.handleError
    );
  }
  </code></pre>
  
  <p>In my <code>streamAudio</code> function, I want to stream this to the Icecast server. Can I do this with some sort of <code>xmlhttprequest</code> or does it need to be done over socket? </p>