Playing *.mp3 file. How to add a mp3 player within a site
Running ...

Without a reader

  • The *.mp3 file must be completely loaded into the local computer. The sound is then played with the local reader associated with *.mp3 files

With a reader

  • This allow to read the *.mp3 file like a stream. The sound is played as soon (few seconds) after reading.
    • The user don't wait
    • Listen O Fortuna, Carl Orff, Carmina Burana

Insert the Reader with a Google Gadget

  • More informations here : 

Using a Playlist with XSPF Web Music Player

  • XSPF Web Music Player is a flash-based web application that uses xspf playlist format to play mp3 songs. XSPF is the XML Shareable Playlist Format
  • I use the Extended version
  • Upload into your site the xspf_player.swf
  • The Playlist and the Player must be hosted in the same Domain

Creating a Playlist

  • Technical specification can be found in XSPF (spiff) site
  • The basic structure of the .xspf file is as follows :

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "">

<title>My Playlist</title>


<annotation>info text for name1</annotation>
<info>URL for more info about name1</info>

  • Save the file with the extension .xspf and upload it into your site

Using <object> to embed XSPF player

  • Type this code, data and value must be typed within one line, with same content :

<object type="application/x-shockwave-flash"
width="400" height="170">

<param name="movie"
<param name="allowScriptAccess" value="always'>
<param name="quality" value="high">
<param name="bgcolor" value="#c3d9ff">


  • To configure the player, use these parameters :

&playlist_url : the url of the xspf file to load

&autoplay : true/false, to start playing without click

&autoload : true/false to load the playlist without click

  • Listen my Playlist :

Removing the <object> tag

  • We can call the player with a javascript :

<script type="text/javascript">


  • The javascript use this script : AC_FL_RunContent. We call the script with this : 

<script src="http://YOURSITE/AC_RunActiveContent.js" type="text/javascript"></script>

  • Listen my Playlist, calling the player without <object> tag :

A Google Gadget with a Flash Reader


More Informations

One Day - One Label - One Wine