<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet type="text/xsl" href="article.xsl"?>

<page>

  <header>
    <title>ReneDeGroot.nl - A Homepage</title>
    <sub-title>MPDplayer</sub-title>
    <author>Ren&#233; de Groot</author>
  </header>

<!--
 <body-item>
    <body-title></body-title>
    <body-paragraph>
    </body-paragraph>
  </body-item>
-->

 <body-item>
    <body-title>Introduction</body-title>
    <body-paragraph>
<a href="mpd.html">MPDplayer</a> is a php-javascript webpage to control a
<a href="http://www.musicpd.org/">Music Player Daemon</a>
(MPD). Music stored on a remote machine can be played by
sending commands to MPD running on that remote machine. MPDplayer runs on a
webserver with PHP and sends the commands to MPD when you search, play and
browses songs on the MPDplayer webpage.
    </body-paragraph>
    <body-paragraph>
I discovered MPD when trying to utilize the potential of having a stored
away server hooked up to a stereo-system. MPD offers fast, easy,
multi-user access by means of
<a href="http://mpd.wikia.com/wiki/Clients">
many different interfaces</a>. It has console
based interfaces, GUI's and webbased interfaces.
I was not quite satisfied with the web interfaces. With the publication
of a AJAX tutorial in
<a href="http://www.linuxmag.nl/nl/">Linux Magazine</a> and the
longstanding intention to reacquaint myself with HTML and PHP I started
this project.
    </body-paragraph>
  </body-item>

   <body-item>
    <body-title>Looks</body-title>
    <body-paragraph>
The following screenshot shows how MPDplayer looks. 
    </body-paragraph>
    <body-paragraph>
<img src="media/mpd-full.png" alt="MPDplayer"/>
    </body-paragraph>
    <body-paragraph>
The layout is done by normal HTML tables where each is filled by a call
to a PHP function. The looks are defined by a single separated CSS
style definition. The layout and looks are thus easily changeable by
anyone with basic HTML and CSS knowledge.
    </body-paragraph>
  </body-item>

  <body-item>
    <body-title>Features</body-title>
    <body-paragraph>
MPDplayer provides a utilitarian interface to MPD. The webpage does not
need to reload since the changing parts update asynchronous. Elements
respond to your mouse movements and clicks.
Further features, ordered by interface element, are:
    </body-paragraph>
    <body-paragraph>
      <ul>
        <li>Player
          <ul>
            <li>Displays the playing song</li>
            <li>Play, Stop, Pause, Forward and Rewind</li>
            <li>Time display</li>
            <li>Up to 5 playlist songs displayed</li>
            <li>Forward and backwards of the shown playlist part</li>
            <li>Center around the playing song in the playlist</li>
            <li>Clearing of the playlist</li>
            <li>Toggleable shuffle and repeat</li>
            <li>Remove a song from the playlist</li>
            <li>Play a song in the playlist</li>
          </ul>
        </li>
        <li>Directory browser
          <ul>
            <li>Displays the current directory</li>
            <li>Open subdirectories of the current path</li>
            <li>Open subdirectories of the current directory</li>
            <li>Add entire directories to the playlist</li>
            <li>Initiate a update of the MPD index</li>
          </ul>
        </li>
        <li>Playlists
          <ul>
            <li>Browse playlists</li>
            <li>Open playlists</li>
            <li>Save playlists</li>
          </ul>
        </li>
        <li>Searching
          <ul>
            <li>Search with a keyword on title, artist, album or filename</li>
          </ul>
        </li>
        <li>Song browser
          <ul>
            <li>List the songs of the current directory</li>
            <li>List the songs of the search result</li>
            <li>Add songs to the playlist</li>
            <li>Insert songs directly after the current song</li>
            <li>Add URL's to the playlist</li>
          </ul>
        </li>
      </ul>
    </body-paragraph>
  </body-item>

 <body-item>
    <body-title>Usage</body-title>
    <body-subtitle>Requirements and installation</body-subtitle>
    <body-paragraph>
MPDplayer requires a webserver that can interpret the php pages. The php
code is written for PHP version 4, other versions could pose a problem.
Security settings should allow the php interpreter run by the webserver to
connect with sockets to the MPD. Installation consists of unpacking
the program into a directory of the webpage.
    </body-paragraph>
    <body-paragraph>
MPDplayer requires a webserver that can interpret the php pages. The php
code is written for PHP version 4, other versions could pose a problem.
Security settings should allow the php interpreter run by the webserver to
connect with sockets to the MPD. Installation consists of unpacking
the program into a directory of the webpage.
    </body-paragraph>
    <body-paragraph>
On the client side the webpage requires a browser with a recent javascript
implementation. Problems with running MPDplayer on Internet Explorer consist of
failure to completely obey the CSS2 style definition. Recent versions of KHTML
browsers, Mozilla browsers and Opera work fine.
    </body-paragraph>
    <body-paragraph>
A computer running a <a href="http://www.musicpd.org/">MPD</a> is needed
to actually play music. The <code>configuration.php</code> must be altered
with the settings of the MPD that will be controlled.
    </body-paragraph>
    <body-subtitle>How to use</body-subtitle>
    <body-paragraph>
Browsing for songs can be done by clicking directory names in the list of
directories. Going to a higher directory then the current one can be done
by clicking on a directory of the current path. The songs in the current
directory are shown in the songs list. Searching is an other option to
find songs. This can be done by selecting a search type, specifying a
keyword and then clicking the search button. The search results will be
shown in the songs list.
    </body-paragraph>
    <body-paragraph>
Songs can be added to the playlist by a number of ways. First there is the
option to open a save playlist. These reside in the Music directory at the
root of the path. Clicking a saved playlist will add all its songs into
the player playlist.
Secondly when browsing the directories clicking on the add left of a
directory will add all the songs found under that directory to the player
playlist.
Thirdly the songs shown in the songs list can be added to the playlist.
This can be done by either clicking the add, and adding them to the end
of the playlist queue. Or by clicking the song itself and inserting them
directly after the currently playing song, making it the next song to be
played. This goes for both the situations when the songs displayed are
those found in a directory or are the result of a search query.
    </body-paragraph>
    <body-paragraph>
The player lets you control the which song is played. Play, Stop and Pause
do just that for the current song. Whilst playing the Frw and Rew can be
used to change the currently playing song. The list of songs next to the
player controls is the section of the playlist with the current song. A
different section can be shown by using the Forward and Backwards of the
playlist. Shuffle and Repeat change how the playlist is played and can
be toggled. Clear removes all the songs from the current playlist.
    </body-paragraph>
  </body-item>
  
  <body-item>
    <body-title>Workings</body-title>
    <body-paragraph>
foo
    </body-paragraph>
  </body-item>
  
  <body-item>
    <body-title>Todo's</body-title>
    <body-paragraph>
The lack of a user base and real world testing and well defined
requirements results in omissions of features. These will be added
when I become aware of them. Currently the following additions are
planned.
    </body-paragraph>
    <body-paragraph>
<ul>
<li>Forward and rewind should also work when a song is not playing</li>
<li>Your suggestion?</li>
</ul>
    </body-paragraph>
  </body-item>

  <body-item>
    <body-title>Download</body-title>
    <body-paragraph>
Latest: <a href="downloads/MPDplayer-release4.2.tgz">Release 4.2</a> fixes javascript 1 bug and adds multiple search fields. Thanks go to Ross for submitting his patch.
    </body-paragraph>
    <body-paragraph>
A new version including a new feature. <a href="downloads/MPDplayer-release4.1.tgz">Version 4.1 of MPDplayer</a> adds a control to access the volume control of the MPD deamon. This new version fixes two bugs, one caused by using HTML escaped characters to communicatie with the MPD backend. This broke the capability to use files and directories with HTML specials characters. The second bug that is fixed is that the search list is now cleared when doing a new search. Thanks to Ivan and Matthias for their feedback.
    </body-paragraph>
    <body-paragraph>
A new version including some new features. <a href="downloads/MPDplayer-release4.0.tgz">Version 4.0 of MPDplayer</a>
unlocks the (MP3) streaming capabilities of the MPD deamon, adds some interaction with the playlist, caches the saved playlists and combines the directory with the listed directory elements. I have also removed some tables used to do layout and moved the body of the page into the default style. Combined with some improvements to the CSS this should simplify changing the appearence of the program. Thanks go out to Bill for his helpful feedback.
    </body-paragraph>
    <body-paragraph>
And again a new <a href="downloads/MPDplayer-release3.3.tgz">release 3.3</a>. of MPDplayer. 
This latest version adresses a problem in display.php on line 161. I believe the problem is 
caused by returning a reference to a function call instead of reference to a variable. 
Must be all the Java that I am used to.<br/>
Thank you AJ and Matthias for reporting the bug.
    </body-paragraph>
    <body-paragraph>
An other bugfix version is available of release 3 which removes a couple of
memory leaks when running under some browsers. Be sure to grab this 
<a href="downloads/MPDplayer-release3.2.tgz">release 3.2</a>. 
Thanks go out to Bill for reporting this problem.
    </body-paragraph>
    <body-paragraph>
An bugfix version is available of release 3 which removes an error when
MPDplayer is run with PHP-5. If you wish to run
<a href="downloads/MPDplayer-release3.1.tgz">MPDplayer</a> with version
5 of PHP be sure to grab this release
<a href="downloads/MPDplayer-release3.1.tgz">3.1</a>.
Thanks go out to Andreas for reporting this problem.
    </body-paragraph>
    <body-paragraph>
A third release of
<a href="downloads/MPDplayer-release3.tgz">MPDplayer</a> is available.
This release features a new look with icons from the
<a href="http://svgicons.sourceforge.net/">BlueSphere Icon Theme</a>.
The load generated by MPDplayer is lowered and the current playlist
has undergone some improvements. Different styles can be created and
chosen with the configuration. A style currently consists of a style
sheet and a set of icons.
    </body-paragraph>
    <body-paragraph>
A second release of
<a href="downloads/MPDplayer-release2.tgz">MPDplayer</a> is available.
This version adds support for Opera, KHTML browsers. The program is now
usable with Internet Explorer.
    </body-paragraph>
    <body-paragraph>
A first release of
<a href="downloads/MPDplayer-release1.tgz">MPDplayer</a> is available.
This version works only on (new) Mozilla based browsers.
    </body-paragraph>
    <body-paragraph>
This program is free software; you can redistribute it and/or modify
it under the terms of the
<a href="http://www.gnu.org/copyleft/gpl.html">
GNU General Public License</a> as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.
    </body-paragraph>
    <body-paragraph>
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.
    </body-paragraph>
  </body-item>

  <footer>
    <footer-paragraph>
Last changes on $Date: 2008-04-14 16:57:34 +0200 (Mon, 14 Apr 2008) $.
    </footer-paragraph>
    <footer-paragraph>
Contact information: email (at) renedegroot.nl
    </footer-paragraph>
  </footer>
</page>
