Spotify talking to facebook in the browser
Facebook’s new music service actually knows when Spotify is playing a song in your browser:
Was kinda curious as to why this worked. It was very responsive and didn’t seem to be using a uri scheme. So I investigated some:
Looks like Facebook is actually polling for a server on the local machine listening on a particular port to control it. This really makes me want to instigate web sockets more.
EDIT:
Looking into it some more you can see it’s just a json get request. Not necessarily a web socket connection: