Playlist of MP3 files in a web page

Introduction

XSPF Web Music Player is one of the Flash players that let you create a playlist, and play songs directly from your web server by clicking on any song in the playlist.

Setup

  1. Download and unzip XSPF Web Music Player. Apparently, you just need xspf_player.swf
  2. Create an index.html with the following code to embed the Flash player:

    <object type="application/x-shockwave-flash" width="400" height="170" data="xspf_player.swf?playlist_url=myplaylist.xspf&autoload=true">

    <param name="movie" value="xspf_player.swf?playlist_url=myplaylist.xspf&autoload=true" />

    </object>

  3. Create a playlist such as this:

    <?xml version="1.0" encoding="UTF-8"?>
    <playlist version="0" xmlns = "http://xspf.org/ns/0/">
        <location>myplaylist.xspf</location>
        <title>Heavy Machinery by Allan Holdsworth, Anders Johansson, Jens Johansson</title>

        <trackList>
            <track><title>Joint Ventures.mp3</title><location>01-Joint Ventures.mp3</location></track>         <track><title>Beef Cherokee.mp3</title><location>02-Beef Cherokee.mp3</location></track>
        </trackList>
    </playlist>
     
  4. Upload index.html, xspf_player.swf, your playlist, and the MP3 files to your web server
  5. Aim your browser at the directory where you uploaded the whole shebbang

Resources