var actx = new AudioContext();
var src = "https://dl.dropboxusercontent.com/s/knpo4d2yooe2u4h/tank_driven.wav",
audioData, srcNode;
fetch(src, {mode: "cors"}).then(function(resp) {return resp.arrayBuffer()}).then(decode);
when src
has URL with a full path it works and play. But I need to be able to play this file placed near my webapp. When I write:
var src = "/sounds/tank_driven.wav",
No sound at all, and a TypeError: Failed to fetch at audioplayer.js:5:1
how to fix it and make it able to play local audio files?
ps. Using any webserver is not considered, i need to make it work on a simple html5 page that will be opened from a flash drive.