|
|
@@ -60,7 +60,13 @@ function loadRemoteAudio(name) { |
|
|
|
|
|
|
|
|
xhr.open("GET", audioBaseUrl + name, true); |
|
|
xhr.open("GET", audioBaseUrl + name, true); |
|
|
xhr.responseType = "arraybuffer"; |
|
|
xhr.responseType = "arraybuffer"; |
|
|
xhr.onload = (xhr) => cacheAndParse(name, xhr.data); |
|
|
|
|
|
|
|
|
xhr.onload = (xhr) => { |
|
|
|
|
|
if (xhr.status == 200) |
|
|
|
|
|
cacheAndParse(name, xhr.data); |
|
|
|
|
|
else |
|
|
|
|
|
console.log("Couldn't load " + name); |
|
|
|
|
|
} |
|
|
|
|
|
xhr.onerror = (xhr) => console.log("Couldn't load " + name); |
|
|
xhr.send(); |
|
|
xhr.send(); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|