I have been toying around with the idea to write an Adobe Apollo application that’s able to monitor your favorite media player (such as Winamp, Windows Media Player, iTunes, Rhythmbox, etc) for play back status and song information.
Last.fm provides an application along with plugins for pretty much all existing media players on all major platforms (Windows, MacOS, Linux, etc) that does exactly that. During installation of the Last.fm client, the user is prompted to install the required plugins for the media players she uses. When a media player executes and plays a song, the plugin establishes a TCP socket connection with the client application and sends status and song infos.
The problem: The Apollo runtime (alpha) that is currently available on Adobe Labs doesn’t provide any documented way of (a) talking to shared libraries, (b) launching executables or (c) serving as a socket server, and Adobe indicated that Apollo likely is not going to support those features in it’s 1.0 release version.
There is hope though. Afaik, the last word on launching executables at runtime from an Apollo app isn’t spoken yet, and there exist some undocumented hacks that enable Apollo apps to do just that. If Adobe should decide against letting apps launch executables, then the only way of solving it is to provide second installers that install a socket server of some sort to do the dirty work.
However, i sat down last night and wrote a proof of concept Flash application that can live in Apollo, which talks to a custom daemon via sockets. The daemon in this proof of concept runs as a Windows Service. I took the Last.fm iTunes plugin and modified a bit so that it also connects to that daemon. The daemon then simply echoes the messages it receives from the Last.fm plugin to the socket listener in Flash. Voilà .
Here’s a screenshot of the app in action (iTunes on top, Flash below):
[Update] I also modified the Last.fm Windows Media Player plugin to work with my daemon. All plugins can be used simultaneously. See this screenshot (Windows Media Player on top, Flash below):
Note that this is only a proof of concept, and sources aren’t ready for release yet. I would very much like to make this an open source project (The Last.fm plugins are released under GPL), so if there are any interested developers out there who like to help, please contact me or leave a comment. Thanks!
Very nice, I might be interested in helping I am working on a few apollo apps of my own and this is a really good project in terms of last.fm user base. Are you posting at google code or?
I decided against using a Windows service and the .NET framework and am currently rewriting the stuff i had in C++ (running as normal but faceless application). I also am implementing a AMF3 de/serializer so i can use simple ByteArray.writeObject() and .readObject() on the socket (the deserializer is almost done). This way we would have a generic RPC gateway that can be used for virtually anything.
Big todos are the MacOS and Linux versions.
Note: Whether this project will be useful or not at all is still uncertain as we don’t know yet if Apollo will support executing third party applications.
Да…. Фактов вÑегда доÑтаточно – не хватает фантазии. Желаю автору ее поболее :)