zachwinter / kaleidosync

A WebGL Spotify visualizer made with Vue, D3, and Three.js.
https://www.kaleidosync.com
809 stars 61 forks source link

Update current track periodically #26

Closed RobinDeBaets closed 4 years ago

RobinDeBaets commented 4 years ago

Great app, I love it.

I was wondering why your current track is only fetched at the end of your current track. Is there a reason why it isn't fetched periodically more frequently to accommodate the fact that people might skip tracks? I have seen similar behaviour in other visualizer so I don't think it's a matter of the Spotify API rate limit.

I would love to integrate this myself into your code, but I haven't had the chance to take a deep dive into it (yet).

zachwinter commented 4 years ago

Thank you!

This is how Kaleidosync originally functioned, but as the app gained popularity (a peak of 20,000 daily users), rate limiting crippled the experience. The purpose of the "refresh" icon is to manually check for the currently playing track, if you decide to change songs before a track ends.

In development mode, the app reverts back to the original behavior. So if you run it locally you'll get what you're looking for.