initial commit

This commit is contained in:
Sebastian Hugentobler 2017-02-10 13:41:41 +01:00
commit e279281330
52 changed files with 916 additions and 0 deletions

25
static/js/app.js Normal file
View file

@ -0,0 +1,25 @@
const min_playtime = 1000
const fade_threshold = 2000
function preload_audio (file) {
return new Howl({
src: [file]
})
}
function play_audio (sound, timeout, callback) {
sound.play()
if (timeout) {
if (timeout - fade_threshold > min_playtime) {
setTimeout(function () {
sound.fade(sound.volume(), 0, fade_threshold)
}, timeout - fade_threshold)
}
setTimeout(function () {
sound.stop()
callback()
}, timeout)
}
}

2
static/js/howler.min.js vendored Normal file

File diff suppressed because one or more lines are too long