diff --git a/src/components/song.js b/src/components/song.js index 4aa4fd6..797728b 100644 --- a/src/components/song.js +++ b/src/components/song.js @@ -175,6 +175,7 @@ AFRAME.registerComponent('song', { this.data.analyserEl.addEventListener('audioanalyserbuffersource', evt => { this.source = evt.detail; + this.source.onended = this.victory; this.el.sceneEl.emit('songloadfinish', null, false); if (this.data.isBeatsPreloaded) { this.startAudio(); } }, ONCE);