i wish load a mp3 local file and next using a library for processing, i cant use XMLHttpRequest, then i use the next code for read a local mp3 file:
<!DOCTYPE html>
<html>
<head>
</head>
<body onload="carga();">
<input id="audio_file" type="file" accept="audio/*" />
<audio id="audio_player" />
<script>
function carga() {
audio_file.onchange = function(){
var files = this.files;
console.log(files);
alert(files);
var file = URL.createObjectURL(files[0]);
console.log(file);
alert(file);
audio_player.src = file;
audio_player.play();
};
}
</script>
</body>
</html>
but XMLHttpRequest return ArrayBuffer, and my code return a FileList, i need a ArrayBuffer for my next processing, how i can load a local mp3 file as a ArrayBuffer?