title: MediaRecorder - How to play chunk/blob of video while recording?
body: <p>I currently have a <strong>MediaStream</strong> which is being recorded using <strong>MediaRecorder</strong>. At the end of the recording <em>after recorder.stop()</em>, it produce a <strong>Blob</strong> and I am able to play that video back. My goal is to play not the entire video at the end, but <strong>play a chunk while recording</strong>. For the moment, a chunk is not playable while recording is not ended.</p>
  
  <p>How can i do that using javascript? The final objective is to send a chunk by websocket that is playable even if recording is in action.</p>
  
  <p>I am not able to bring new solutions. Can anyone help or at least explain me the things ?</p>
  
  <p>What I've tried was</p>
  
  <pre><code>                navigator.mediaDevices.getUserMedia().then(function(media_stream) {
                      var recorder = new MediaRecorder(media_stream);
  
                      recorder.ondataavailable = event =&gt; {
                          //How to play each chunk without waiting for recorder.stop() ???
                          //event.data represent the data of a chunk (i.e. a blob)
                      };
  
                      recorder.start(1000);
                  });
  </code></pre>