summaryrefslogtreecommitdiff
path: root/www
diff options
context:
space:
mode:
authorAlex Xu <alex_y_xu@yahoo.ca>2013-09-02 19:52:53 -0400
committerAlex Xu <alex_y_xu@yahoo.ca>2013-09-02 19:52:53 -0400
commitbd28c76f662039cf289e2e224e7841eebeaf6fe8 (patch)
treeb2584deb531a7370a4a290a000365b434bac77f0 /www
parent0778a73c554eaf3fb876804acec6d2fcb9879cc8 (diff)
downloadhtml5ks-bd28c76f662039cf289e2e224e7841eebeaf6fe8.tar.xz
html5ks-bd28c76f662039cf289e2e224e7841eebeaf6fe8.zip
play URL bug
Diffstat (limited to 'www')
-rw-r--r--www/js/api.js12
1 files changed, 11 insertions, 1 deletions
diff --git a/www/js/api.js b/www/js/api.js
index fae899e..4d746a5 100644
--- a/www/js/api.js
+++ b/www/js/api.js
@@ -40,7 +40,17 @@ window.html5ks.api = {
}
html5ks.elements.audio[channel] = audio;
- var src = "dump/" + (channel === "music" ? html5ks.data.music[name] : html5ks.data.sfx[name]);
+ var src = "dump/";
+
+ switch (channel) {
+ case "music":
+ src += "bgm/" + html5ks.data.music[name];
+ break;
+ case "ambient":
+ case "sound":
+ src += "sfx/" + html5ks.data.sfx[name];
+ }
+
if (Modernizr.audio.opus) {
audio.src = src + ".opus";
} else if (Modernizr.audio.ogg) {