Remove optional throttling

This commit is contained in:
Chris Blanchard 2015-09-23 10:26:12 +01:00
parent 3ba7c4ecb8
commit b45b60e822

View file

@ -5,7 +5,7 @@ class SoundController {
if (Howl === undefined) {
throw new Error("Howl.js required to created sound controller");
}
this.minPlayInterval = 300000; // 5 minutes
this.minPlayInterval = 180000; // 5 minutes
this.isMuted = Howler._muted;
this.volume = Howler._volume;
this.tunes = {
@ -70,17 +70,14 @@ class SoundController {
};
}
playGatherMusic (options) {
playGatherMusic () {
var self = this;
options = options || {};
if (!self.gather.playable) return;
self.gather.music.play();
self.gather.playable = false;
if (options.throttle === false) {
setTimeout(function () {
self.gather.playable = true;
}, self.minPlayInterval);
}
setTimeout(function () {
self.gather.playable = true;
}, self.minPlayInterval);
}
}