restart song on clear game
This commit is contained in:
@@ -17,7 +17,7 @@ AFRAME.registerComponent('song', {
|
||||
audio.crossOrigin = 'anonymous';
|
||||
this.el.sceneEl.appendChild(audio);
|
||||
|
||||
this.el.addEventListener('pausemenurestart', () => {
|
||||
this.el.addEventListener('cleargame', () => {
|
||||
if (audio.paused) {
|
||||
audio.currentTime = 0;
|
||||
audio.play();
|
||||
|
||||
Reference in New Issue
Block a user