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>
and /www/cgi-bin/mpd (chmod to allow execute)
- 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
That is all. Now open your browser and enter http://192.168.1.1 or whatever ip you assigned to the router. It should also work on smartphones. If you use a iPhone you add it to your homescreen and will be almost like an app.
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.
