[Techtalk] Using a web browser to control stuff locally -eek!

Lucia Sanchez lu at gusilu.net
Sat Aug 20 19:26:50 EST 2005


I've been thinking about this and there are several ways of doing that I've 
thought of.

 From what I understand you're going to have one computer with the music files 
and speakers connected to it, and the rest of the computers on the LAN should be 
able to select songs to play on it, am I right?

I guess the first thing to do is to figure out which player you're going to use 
and to find it how to make it work on the command line.  XMMS has xmmsctl wich 
enables the passing of parameters, and Amarok uses dcop; those are the two that 
I know of.  I would personally recommend Amarok, because you can set it up using 
a MySQL database in which it will store information about all the songs you 
have; information you could display on your web page by getting it directly from 
the databse.

As for using dcop...... on Amarok's wiki there's a list of commands:
http://amarok.kde.org/wiki/index.php/DCOP_Functions

The only problem I can see with using either of these players is that you need 
to have an Xsession started with the player started in it for all this to work.

Then you'll also need a web server, probably Apache, just remember to make all 
pages related to this viewable only from IPs belonging to you LAN (with the 
Allow, Deny options).

As for the actual scripting; I would recommend PHP because it's quite easy to 
learn, works well with databases and generates HTML very easily -- and also 
because it's what I use and know :-P  But any other scripting language should do 
(Python, Perl..) so whichever you feel more comfortable with.

So once you have enough coding experience you try to do something more 
complicated such as have a playing queue wich calls mpg321 with the next song to 
play, handles different users, gives priority to enqueueing songs from diffenet 
user, etc...  But of course, this is probably more difficult :)


Good luck and let us know how you're doing, it sounds like an interesting 
project! :)
-- 
Lu.

------------------------------------
  I will live forever or die trying.
------------------------------------


More information about the Techtalk mailing list