1

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

Funkyguy
  • 628
  • 2
  • 10
  • 31
  • You've tagged this with "libspotify", but you're talking about writing Spotify Apps. These are two different APIs for two different purposes. Libspotify is a native API for writing applications that run independently of the Spotify client. The Spotify Apps API is an HTML/Javascript-based API for writing apps that run in the Spotify API. You should probably either remove the libspotify tag or clarify what kind of app you're writing. – Weeble Sep 22 '13 at 19:03

1 Answers1

2

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.

iKenndac
  • 18,730
  • 3
  • 35
  • 51
  • Hmm, alright, thanks! I wasn't aware they ended. I thought they had some kind of persistence like android apps. That actually might cause a problem. – Funkyguy Sep 23 '13 at 15:48