-
Notifications
You must be signed in to change notification settings - Fork 17
Enslaving third party players
RJ edited this page Sep 13, 2010
·
7 revisions
Assuming playdar had a player api (stop start pause etc) it would need to delegate playback to certain third-party apps like rd.io or spotify.
One approach is to spawn the third-party app in headless mode:
./rdio.exe —headless
and send it commands on stdin, receive replies on stdout.
Commands might include:
- play
- togglepause
- stop
- setvolume <1-100>
- stat
- which returns current NP data, position of playback (ie 120 of 300 secs) etc
stat could be emitted automatically on song change.
The third-party app would open a TCP port on localhost, or run a small http server on localhost.
Send various commands over that port.
Windows messages, or use a named pipe or something.