I am getting audio stream from getUserMeda and then convert it into a blob or buffer and send it to server as audio is comming I am using socket.io to emit it to server how can i convert audio mediastream into buffer?
Following is the code that i have written yet
navigator.getUserMedia({audio: true, video: false}, function(stream) {
webcamstream = stream;
var media = stream.getAudioTracks();
socket.emit("sendaudio", media);
},
function(e){
console.log(e);
}
});
How to convert stream into buffer and emit it to node.js server as stream comes from getusermedia function?
stream
to a WebRTC Peer connection. – Ethnology