title: How to send video stream to node.js server
body: <p>My goal: send some video stream from one client to another throught node.js server. But I can`t even send video from first cleint to server.</p>
  
  <p>Cleint</p>
  
  <pre><code>var socket = io(":9966");
  
      socket.on('message', function (data) {
          console.log(data)
      })
  
      function onVideoFail(e) {
          console.log('webcam fail!', e);
      };
  
  
      window.URL = window.URL || window.webkitURL;
      navigator.getUserMedia  = navigator.getUserMedia ||
          navigator.webkitGetUserMedia ||
          navigator.mozGetUserMedia ||
          navigator.msGetUserMedia;
  
      var video = document.querySelector('video');
  
  
          navigator.getUserMedia({video: true}, function(stream) {
              console.log(stream);
              video.src = window.URL.createObjectURL(stream);
  
              var arrayOfStreams = [stream];
              var medias = new MediaStreamRecorder(stream);
              medias.ondataavailable = function(blob) {
                  socket.emit("streaming", blob);
              };
              medias.start();
              socket.emit("streaming", stream);
              socket.emit('test', 'mess from 1');
          }, onVideoFail);
  </code></pre>
  
  <p>Server</p>
  
  <pre><code>io.on('connection', function (socket) {
  log.info('new con!', socket.id);
  
  socket.send("you connected to server");
  
  socket.on('test', function (data) {
      console.log(data);
      socket.broadcast.send(data);
  });
  
  socket.on('streaming', function (stream) {
      log.info("i`m in stream", socket.id);
      log.info(stream);
  
      socket.broadcast.emit('streaming', stream);
  });
  });
  </code></pre>
  
  <p>I can send text and everything great, but when I send stream to server I get empty value. </p>
  
  <p><a href="https://i.stack.imgur.com/sm5bM.png" rel="nofollow noreferrer">What I see on server side</a></p>
  
  <p>I looked for some tips and found, but still not working. Maybe I missed something.</p>
  
  <p>Can anyone help me? </p>
  
  <p>PS I getting video from video tag</p>