Because you help me a lot, the minimum is to share my code. Finally I only used bash script because my chumby classic is slow like hell and also because then I dont need a dongle usb :-) So you just have to create the following file in the folder /psp/cgi-bin and to give them the executable flag (chmod +x file). The Javascript part is on my public dropbox, it's the main part of this application.
/psp/cgi-bin/player
#!/bin/sh
echo "HTTP/1.1 200 ok"
echo "Content-type: text/html"
echo ""
echo "<script type='text/javascript' src='http://code.jquery.com/jquery-1.7.min.js'></script>"
echo "<script type='Text/javascript' src='http://dl.dropbox.com/u/30225532/chumby/chum.js'>"
echo "</script>"
echo "<h1>Chumby</h1>"
echo "<h2>Player</h2>"
echo "<button id='stop_player'>Stop</button>"
echo "<select id='volume_player'><option>Select volume</option></select>"
echo "<h2>Streams</h2>"
streams_xml=`cat /psp/url_streams`
echo "<input id='streams_xml' value='$streams_xml' type='hidden' />"
echo "<div id='streams'></div>"
echo "<button id='add_stream'>Add</button>"
echo "<button id='save_stream'>Save</button>"
/psp/cgi-bin/event
#!/bin/sh
echo "HTTP/1.1 200 ok"
echo "Content-type: text/html"
echo ""
echo "${QUERY_STRING}" | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e > /tmp/flashplayer.event
echo "<pre>"
chumbyflashplayer.x -F1
echo "</pre>"
/psp/cgi-bin/save_streams
#!/bin/sh
echo "HTTP/1.1 200 ok"
echo "Content-type: text/html"
echo ""
cp /psp/url_streams /psp/url_streams.$(/bin/date +%Y-%m-%d-%H.%M.%S).bak
echo "${QUERY_STRING}" | sed -e's/%\([0-9A-F][0-9A-F]\)/\\\\\x\1/g' | xargs echo -e > /psp/url_streams
What's left to do (but I will not do it cause I am lazy )
There is a problem if the url contain a &, after what, jquery dont manage to parse the XML. I guess I would have to replace all & by ∧ or something like that.
Would be nice also to have some CSS.
The button play doesn't work and I dont know enough bash programming to do it (no time to find out...).
That would be really great to have something like this by default on the chumby or on the personal dashborad from chumby.com.
Enjoy, Alex
(This script are not really safe if your chumby is directly accessible from outside your network but in 1 side it's only a chumby so and not so much can happen !!)