zachwinter / kaleidosync

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

Rate limiting for self hosted kaleidosync #19

Closed codesalatdev closed 4 years ago

codesalatdev commented 4 years ago

Hey there, nobody asked for it but I'd like to give my two cents to the change made in commit bdfb0eed28d5f9043da3f2a9d587d50947a48a6f:

First off, let me say that I love this application! Really great work and some nice visualizations.

I'm actually using kaleidosync as a background for my live streams while music is playing. Now, because it's embedded as a Browser source, there isn't a really convenient way to interact with the site on demand and it just doesn't look that clean if I am clicking around. Before this commit, I could skip a song and the visualizer would adapt to this change (also pause and resume some time later). Since I also work with the Spotify API for another piece of software, I know that there are some limitations in terms of rate limiting which is a problem when one instance of the application is used heavily (which I assume is the case for the main website).

As you're sharing the code for this beautiful piece of software on GitHub (thank you btw) and therefore enable us to install it on our own servers (which shouldn't have that amount of traffic), I think that it would be beneficial to have an option that reverts back to the original behavior.

I understand that it's not really a priority and I am probably part of only a handful of people which would benefit from this change, but maybe it is something you'll consider.

Keep up the great work

zachwinter commented 4 years ago

Oh man, why didn't I think of this... I will definitely revert back and include an option to use either behavior.

Sorry about that! I'll be able to get to this within the next couple of days.

zachwinter commented 4 years ago

5.4.0 reverts back to polling when running the dev server.

The variable for toggling polling (in any environment) can be found here:

@/store/modules/spotify.js:75