title: Write webm blobs / base64 to file via node mediaRecorder
body: <p>I'm trying to record a webcam stream via my node server into a new file. To get the webm Blobs I use the <code>mediaRecorder</code> api and then send those via <code>binaryJs</code> to my node server. Then I don't know how to proceed. My current code in node looks like this, but I don't know how to write the chunks to a file:</p>
  
  <pre><code>var binaryServer = require('binaryjs').BinaryServer;
  var serverBinaryVideo = binaryServer({port: 9002});
  
  serverBinaryVideo.on('connection', function(client) {
  
      client.on('stream', function(stream, meta) {
  
          stream.on('data', function(chunk) {
              console.log(chunk);
          });
  
          stream.on('end', function() {
  
          });
  
  
      });
  });
  </code></pre>
  
  <p>Does it work like this, or should I convert the blob to base64 on my client?</p>
  
  <p>Client Js looks like this for now:</p>
  
  <pre><code>var clientVideo = new BinaryClient('ws://localhost:9002/');
  
  clientVideo.on('open', function() {
    // for the sake of this example let's put the stream in the window
    window.StreamVideo = clientVideo.createStream();
  });
  
  
  var options = {
      audioBitsPerSecond : 128000,
      videoBitsPerSecond : 2500000,
      mimeType : 'video/webm;codecs=h264' //mp4 not supported in chrome. Original: 'video/webm'
  }
  
  var mediaRecorder = new MediaRecorder(audiovideostream, options);
  mediaRecorder.start(500); //call every 500ms
  
  mediaRecorder.ondataavailable = function(e) {
      // console.log("mediarecorderData");
      // console.log(e);
      reader.readAsDataURL(e.data); 
      videoProcess(e.data)
      // chunks.push(e.data);
  }
  
  mediaRecorder.onerror = function(error) {
      console.log(error);
      // chunks.push(e.data);
  }
  </code></pre>