Guest User

Untitled

a guest
Mar 19th, 2015
1,027
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. var fileInput = $('#input');
  2.  
  3. fileInput.on('change', function (e) {
  4.     e.preventDefault();
  5.  
  6.     var files = fileInput.get(0).files;
  7.  
  8.     for(var j=0; j<files.length; j++){
  9.         if(files[j].type.match(/audio\/(mp3|mpeg)/)){
  10.  
  11.             getID3Data(files[j], function (song) {
  12.                 allTracks.push(song);
  13.                 playlist.push(song);
  14.                 $('#list').append($(returnTrackHTML(song, playlist.length-1)));
  15.             });
  16.         }
  17.     }
  18. });
RAW Paste Data