Pregunta

I've been scouring the internet for some sort of support for this and I cant seem to find much so I have to start a question.

I have a project where I am to display the track title, artists name, and other basic song information, on a separate physical display, much like those LED signs you'll see at stores. In order for me to do this, I have to open some sort of pipeline from the spotify app (the app i'm going to create) to a serial port on the clients computer that eventually makes its way to the display.

Spotify apps run on basic web design languages (Javascript, HTML, CSS) so I figure I could use something like socket.io, although that seems to be more for a browser rather than a general javascript using application. So is there a way for me to open a pipeline from a server to a client using basic javascript that would be able to interact with spotify and a client?

I apologize for the abstractness of this question, but I feel like I've explained it well enough

¿Fue útil?

Solución

The Apps API supports WebSockets just fine, so you can write a server application that you run on localhost and have your Spotify App connect to it. Or, you could skip sockets and write a little REST API to run on localhost that your Spotify App calls with the relevant details every time a song changes.

However, be aware that Spotify Apps don't run forever. If your app isn't visible on-screen (say, if you've navigated elsewhere in Spotify), it'll get suspended after a few minutes.

Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top