Browse Source

Audio is loaded from a story-specific directory

tags/v0.1.0
Fen Dweller 6 years ago
parent
commit
dbebcd3d87
1 changed files with 3 additions and 2 deletions
  1. +3
    -2
      audio.js

+ 3
- 2
audio.js View File

@@ -6,7 +6,7 @@ let waiting = {};
let audioContext;
let gainControl;

const audioBaseUrl = "./media/audio/";
let audioBaseUrl;

let audioDict = {};

@@ -235,9 +235,10 @@ function initAudio(story, state) {
gainControl.connect(audioContext.destination);
}


createCache();

audioBaseUrl = "./media/" + story.id + "/audio/";

story.sounds.forEach(sound => {
loadAudio(sound);
});


Loading…
Cancel
Save