From 8034e78501cce66f61f8ae3159ff9ab48b7e1bb8 Mon Sep 17 00:00:00 2001 From: Kevin Ngo Date: Sat, 13 Oct 2018 12:10:52 -0700 Subject: [PATCH] check current time to decide whether to pause preview song --- src/components/song-preview.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/components/song-preview.js b/src/components/song-preview.js index ee45f80..267845a 100644 --- a/src/components/song-preview.js +++ b/src/components/song-preview.js @@ -45,7 +45,8 @@ AFRAME.registerComponent('song-preview-system', { // Play clicked. // But don't start playing it if it wasn't playing already. if (!oldData.challengeId && data.challengeId) { - if (this.analyserEl.components.audioanalyser.volume === 0) { + if (this.analyserEl.components.audioanalyser.volume === 0 || + this.audio.currentTime < 1) { this.stopSong(); } else { this.el.components['animation__songpreviewfadedown'].beginAnimation();