I created a demo page to see it in action. It's a simulation, so you can't turn on my radio
http://gerben.algemeenbekend.nl/mpc/
It's not entirely finished, but enough to be usable. When I have more time I will probably add playlist manipulation to it.
The OpenWrt image of Jeff already had a http client running, so you just need to create the following files
/www/index.html
Code: Select all
<!DOCTYPE html><html><head><title></title><meta name="viewport" content="width=device-width">
<link rel="mpd" href="cgi-bin/mpd">
<body><script src="http://gerben.algemeenbekend.nl/mpc/mpc.js"></script>
Code: Select all
#!/bin/sh
echo "Content-type: text/plain"
echo "Connection: close"
echo ""
read sentcommand
if [ -z "$sentcommand" ];then
exit
fi
echo "$sentcommand" | nc 127.0.0.1 6600
Feel free to ask questions, report bugs (or do feature requests if you ask nicely ).
PS. licensing is WTFPL, except for some of the icons that are GPL.
PS2. I forgot the meta viewport in the html file. The code above is now corrected.