This project has moved. For the latest updates, please go here.

How To Create a Playlist

Silverlight Audio Player needs an XML playlist to know what audio file(s) you want it to play. This article explains the format of that playlist.
By default, Silverlight Audio Player will be looking for a file called playlist.xml in the same folder as the .xap file. You can however override this to point to any playlist file by using the initParams of the Silverlight control.

Playlist.xml

<?xml version="1.0" encoding="utf-8" ?>
<playlist>
  <audiofile url="test1.mp3" title="Title One" artist="Someone" />
</playlist>


The title and artist are used by the players to display the information about the currently playing file. These are needed because Silverlight does not automatically extract this information directly from the MP3 file (I haven't tried with WMA).

Currently, if your playlist contains only one audiofile entry, then you will get the SimplePlayer, and it it has more than one you will get the MultiPlayer. The intention is to enhance the playlist.xml syntax to allow you to choose which player to use, and to customise its appearance more.

Last edited Apr 4, 2008 at 10:16 AM by markheath, version 2

Comments

No comments yet.