webmpd is an AJAX-powered web front-end to the MPD music player program. I made it to learn some javascript and play with some UI ideas.
Current status
- As of 2006-03-20, it was quite usable with the firefox and konqueror versions of the time, but I no longer use it myself (just mpc and gmpc nowadays), so bit rot may have set in.
- Download webmpd-0.3.
- Mail hannesATskynet.ie with comments or bug reports.
- Current features:
- Playback status and controls.
- Playlist display, supports playlist skipping, deleting playlist entries.
- Tree view database browser.
- Find-as-you-type database search.
- Saved playlist handling.
- "Skinnable" via style sheets / html templates
- Works with Mozilla and Konqueror.
- TODOs:
- Playlist reordering (drag & drop?).
- Support for Internet Explorer. Maybe.
Version History
- Version 0.3 (2006-03-20)
-
- More efficient (i.e. non browser crashing) handling of large
playlists and search results with page up/down links.
- Fast multi-item add and delete.
- Lots of bugfixes and under-the-hood cleanups.
- Version 0.2 (2006-02-16)
-
- Saved playlist support
- Bugfixes for inconsistent results appearing in the search, wrong
files being added by the "add search results" function.
- Fixed-position ("sticky") player controls
- Multiple playlist item deletion (needs more work: too slow)
- Alternate style sheet
- Individual tabs, database directories and playlist items now
have bookmarkable links. (Mozilla only)
- Playlist position numbers are links to the corresponding entry.
- Some fixes for http streams: total time, "Name" tag, browse links.
- Faster playlist data loading. ~1000 items should work without lockups now.
- "Add URL" function
- Fix character encoding problem with konqueror
- Minor bugfixes and layout-tweaking
- Version 0.1 (2006-01-30)
Requirements
- A webserver with CGI support (Apache and thttpd are known to work).
- Perl. Using version 5.8.4 for development. Apparently versions prior to 5.8 may cause problems with unicode characters. No exotic modules required.
- MPD. Obviously.
Design
- Goals
-
- Enough functionality to be a complete interface to MPD.
- No waiting for page reloads, no "refresh" links. (What the cool kids are calling Ajax)
- Support all "modern" browsers (ie those with decent javascript DOM support and some form of xmlHttpRequest functionality). Limited by what I can get my hands on to test with.
- Minimal server-side requirements (e.g. no databases...).
- "Skinnable" to taste with minimal CSS / HTML editing.
- Non-goals
-
- Support for non-javascript browsers. If you need this, I can recommend phpMp2 or neoMPC.
- Security. Although you can probably configure your webserver to do https and/or http password authentication.
- Implementation
-
- A CGI script (perl) runs continuously, monitoring MPD for status changes. When a status change is detected, it outputs a small piece of javascript containing the new data.
- A webpage with lots of javascripty goodness loads this CGI script into an iframe. The javascript in the iframe calls an update handler in the main page, which takes care of displaying things.
- A second CGI script accepts commands for the MPD backend, via asynchronous requests triggered from the webpage.
Credits
hannesATskynetDOTie
Last modified: Wed May 12 18:12:53 CEST 2010