title: Convert file to ArrayBuffer in javascript
body: <p>I'm trying to follow <a href="http://html5-demos.appspot.com/static/media-source.html" rel="nofollow">this</a> example about media source extensions.</p>
  
  <p>I have a webm file at a given URL, and I want to append it to my video tag. </p>
  
  <p>My code is:</p>
  
  <pre><code> Template.video.events({
     'click button': function () {
       var ms = new MediaSource();
  
       var video = document.querySelector('video');
       video.src = window.URL.createObjectURL(ms);
  
       ms.addEventListener('sourceopen', function(e) {
  
         var sourceBuffer = ms.addSourceBuffer('video/webm; codecs="vorbis,vp8"');
         var reader = new FileReader();
         var file = File("video/movie.webm");
         var chunck = reader.readAsArrayBuffer(file);
         sourceBuffer.appendBuffer(chunck);
  
       }, false);
  
     }
   });
  </code></pre>
  
  <p>How can transform the webm at the given URL in a arraybuffer so I can feed it to appendBuffer?</p>