kbhomes/radiant-player-mac — pull request #209 by jhbruhn (2014-07-13 15:16:13+00:00)
Title: WebSocket Server for Remote Control

Hi!
I've just implemented a WebSocket server which is running in the background. My aim is to write an Android App which is able to control Radiant Player, that's why I'm doing this. The Socket also broadcasts the currently playing song when it changes and also when someone connects.
The messaging is based on JSON:

The Client can send these Messages:
* ```{ "action": "playpause" }```: Play/Pause the current Song
* ```{ "action": "forwardAction" }```: Skip the current Song
* ```{ "action": "backAction" }```: Go to beginning/previous Song

The Server sends this Message when he feels that the client should update those values:
```
{
"title": "Title of the Song",
"album": "Name of the Album",
"artUrl": "URL to the Album Art",
"artist": "Artist of the Song"
}
```

I had to add 2 dependencies: PocketSocket and JSONKit. Implementing these two things by hand would have been tedious.