I\'m trying to get sound working on my iPhone game using the Web Audio API. The problem is that this app is entirely client side. I want to store my mp3s in a local folder (
I had the same problem and I found this very simple solution.
audio_file.onchange = function(){ var files = this.files; var file = URL.createObjectURL(files[0]); audio_player.src = file; audio_player.play(); };
You can test here: http://jsfiddle.net/Tv8Cm/