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