I have pretty much the same problem. I want to send the Audio-Date from the microphone MediaStream direct to the Server via Websockets, because I need to analyze the Audio-Data on the Server side, but I can't get the Audio-Date from the MediaStream.I found a solution for sending the Video MediaStream direct to the Server, but not the Audio mediaStream. For sending the Video MediaStream simple render the <video> Tag to a Canvas and get from the Canvas an Image.This Image need than send to the Server. this Article shows how it works. For getting Audio MediaStream, I can't use PeerConnection because there are only for Browser to Browser connection!