Fabrizz / MMM-OnSpotify

Highly customizable MM2 module that displays what you are listening to in Spotify. Compatible with MMM-LiveLyrics and DynamicTheming.
MIT License
65 stars 10 forks source link

Minor feedback on setup #52

Closed NashJames closed 7 months ago

NashJames commented 8 months ago

Hey! Love the module. Super helpful setup and especially love your designs/animations!

Figured I'd drop in a couple small pieces of feedback from my experience getting it assembled:

1) #28

I didn't feel that any of these were worth their own issue as I got it working perfectly. Hopefully you find some of it helpful.

Looking forward to seeing it in action on my mirror soon!


P.S. Any interest in having a go at an audio visualiser module for Spotify? Something like this or this? Always wanted to try myself but never could justify the time needed to look into the Raspotify or Librespot API docs. Given your profile, seems like you've got tons of knowledge on this stuff already

Fabrizz commented 8 months ago

Hi, thanks for the input. About the first one it seems to be when you have an old socket.io connection trying to reconnect again with the server, I can replicate the issue after rebooting the server and having the "old" frontend still open, any help on how to solve this or how to detect this socket.io issue is appreciated, maybe just generating a UUID from the backend to compare, but im sure that a easier fix is possible.

2 I will rollback the authentication server js file, there was another person with similar issues.

3 Will change

4 Will add spotifyVectorAnimations and scrollAnimations to the docs, it seems that I just deleted it.

5 Im currently working on MMM-HomeKit, and that is probably the last MM module/update to a module that I will do, as I want to do other stuff. Now to actually use those libraries (or similar projects that use the web audio api), you need to have the audio source in the same page. Using the Web Playback SDK from Spotify in the same context as the library is far easier than using librespot, extracting the audio, passing the chunks, etc.

Fabrizz commented 8 months ago

Spotify changed how the dashboard looks, so the instructions need to be updated.

Also you strictly need your token to have user-read-playback-state user-read-currently-playing user-top-read user-read-private scopes. I dont know if MMM-Spotify includes all of those

NashJames commented 8 months ago

The only simpler idea that immediately comes to mind is to handle that specific error in a way that outputs a human readable error message, and prevents it from logging more than once. Your UUID fix is definitely more robust though and would remove the error entirely. I haven't messed with sockets in a few years unfortunately.

No worries about the visualiser module, I totally understand wanting to pick up other projects. I hadn't seen the web player SDK before but just had a quick look and not sure there's a way to parse the full audio file? Isn't DRM going to be an issue as well? If you've got a rough working idea I'd love to hear it

I'm assuming the permissions for MMM-spotify are roughly similar given it's all working as far as I can tell. I don't exactly remember what it required and I don't see any listing of given permissions in the developer dashboard. I'll re-auth if it's ever an issue.

Thanks.

Fabrizz commented 8 months ago

Synchronizing anything with music/artwork goes against Spotify Tos, if its a non-comercial app it does not matter. My app https://elecciones.fabriz.co/ was not authorized for "stream-ripping" (using artist profile pics and having a share button was categorized as "stream-ripping", I didnt even bother to appeal, they also heavily impose a rule were you can change the image (ej, borders or centering) even thought the native spotify app does)

About using the web sdk, you are right, its an iframe with the media streaming logic inside, I dont know if there is a way to get audio characteristics from an Iframe

NashJames commented 8 months ago

That's interesting. Thanks.

I imagine it's still likely possible with microphone input, just at a lower quality. Useful to know if it is something I ever get time for.