Setting hasLooped flag when sound has ended and is supposed to loop

This commit is contained in:
Pavle Goloskokovic 2017-12-21 16:53:03 +01:00
parent 879e52a735
commit a766ff9c2c

View file

@ -145,8 +145,7 @@ var WebAudioSound = new Class({
if (ev.target === _this.source) { if (ev.target === _this.source) {
// sound ended // sound ended
if (_this.currentConfig.loop) { if (_this.currentConfig.loop) {
_this.resetConfig(); _this.hasLooped = true;
_this.createAndStartBufferSource();
} }
else { else {
_this.hasEnded = true; _this.hasEnded = true;