genre / num beats / song length / upvotes / downvotes from updated search index
This commit is contained in:
@@ -177,8 +177,6 @@ AFRAME.registerComponent('song-preview-system', {
|
||||
this.fadeIn();
|
||||
this.updateAnalyser();
|
||||
|
||||
this.el.sceneEl.emit('menuselectedchallengesonglength', this.audio.duration, false);
|
||||
|
||||
// Prefetch buffer for playing.
|
||||
if (audioanalyser.xhr) { audioanalyser.xhr.abort(); }
|
||||
audioanalyser.fetchAudioBuffer(utils.getS3FileUrl(challengeId, 'song.ogg'));
|
||||
|
||||
@@ -31,7 +31,9 @@ AFRAME.registerComponent('song-progress-ring', {
|
||||
const source = this.el.sceneEl.components.song.source;
|
||||
if (!source) { return; }
|
||||
|
||||
const progress = this.context.currentTime / source.buffer.duration;
|
||||
const progress =
|
||||
this.el.sceneEl.components.song.getCurrentTime() /
|
||||
source.buffer.duration;
|
||||
this.progress.value = progress;
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user