title: HTML5 Audio to play a playlist of local mp3 files
body: <p>After searching a while for how to make audio tag to play a song from local machine, I found this solution (<a href="https://stackoverflow.com/questions/38265242/play-audio-local-file-with-html">Play audio local file with html</a>):</p>
  
  <pre><code>var $audio = $('#myAudio');
  $('input').on('change', function(e) {
    var target = e.currentTarget;
    var file = target.files[0];
    var reader = new FileReader();
  
    console.log($audio[0]);
     if (target.files &amp;&amp; file) {
          var reader = new FileReader();
          reader.onload = function (e) {
              $audio.attr('src', e.target.result);
              $audio.play();
          }
          reader.readAsDataURL(file);
      }
  });
  </code></pre>
  
  <p>And html:</p>
  
  <pre><code>&lt;script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"&gt;&lt;/script&gt;
  &lt;input type="file"&gt;
  &lt;audio controls id="myAudio" autoplay&gt;&lt;/audio&gt;
  </code></pre>
  
  <p>The above code looks good for one file. The question is that is there a good way to load multiple files from input to make the audio play them like a playlist, without creating multiple instances of FileReader simultaneously? Something like storing the files in array first, and then feeding src or audio from that array.</p>