How can I add the XSPF player in Myspace?

If you have a MySpace account, you might want customize your profile a little more by adding music. One particularly popular way is to add a music playlist, which is a streaming device that allows users to upload music from their desktop to their chosen host so that it can be played in their profile.

A common playlist is the XSPF (XML Shareable Playlist Format) player. A talented programmer named Fabricio Zuardi invented this player with a very basic, rudimentary flash interface and Actionscript 2. It plays mp3s in the lists by reading the XSPF file.

There are three different kinds of the XSPF players:

  1. The Extended version: This consists of the player's controls, the list of songs, the album cover, and the current track playing.
  2. The Slim version: This is a simpler and smaller version, consisting of the player's controls and current playing track.
  3. The Button version: This is a much simpler and smaller version than the others. Obviously, it's a button where you click once to play the player and click again to stop.

First, download the type of XSPF player you want by going to the URL:

http://musicplayer.sourceforge.net/

Download the chosen file to your desktop and then upload it to the server. Open notepad and copy and paste this:

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

<playlist version="0″ xmlns="http://xspf.org/ns/0/">

 <trackList>

  <track>

   <location>http://www.example.com/song.mp3</location>

   <image>http://www.example.jpg</image>

   <annotation>Name of Track</annotation>

  </track>

  <track>

   <location>http://www.example.com/song.mp3</location>

   <image>http://www.example.jpg</image>

   <annotation>Name of Track</annotation>

  </track>

 </trackList>

</playlist>

Replace the image names and song titles with the proper words. When you want to add more songs, just copy:

<track>

 <location>http://www.example.com/song.mp3</location>

 <image>http://www.example.jpg</image>

 <annotation>Name of Track</annotation>

</track>

You should make sure you do the above before the </trackList>. You can put as many songs as you want, so long as you don't exceed the bandwidth of your server. When you are done, save this as .xspf and upload it to your server. Don't forget to upload your songs into the <em>same</em> directory in your server.

To embed the player into your MySpace, place this code wherever you want the player to be placed (About Me, I'd Like to Meet, etc.)

Basic Code for Extended Version:

<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" 
        codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,0,0″
		   width="400″ height="168″> 

 <param name="allowScriptAccess" value="sameDomain"/>

 <param name="movie" value="http://www.example.com/xspf_player.swf"/>

 <param name="quality" value="high"/>

 <param name="bgcolor" value="#000000″/>
 <embed src="http://www.example.com/folder/xspf_player.swf?playlist_url=playlist.xspf" 
        quality="high" bgcolor="#000000″ name="xspf_player" allowscriptaccess="sameDomain" 
        type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" 
        align="center" height="168″ width="400″>
 </embed>
 
</object>

Change the properties to fit your needs. Be sure to change the:

<embed src="http://www.example.com/folder/xspf_player.swf?playlist_url=playlist.xspf"

to the actual URL to where the XSPF and .swf file is located.



Top 5 Free Networking Tools

Bookmark How can I add the XSPF player in Myspace?

Latest Blog Posts


English English GermanGerman SpanishSpanish FrenchFrench ItalianItalian PortuguesePortuguese RussianRussian DutchDutch
GreekGreek HindiHindi JapaneseJapanese KoreanKorean ChineseChinese Chinese (Simplified)Chinese (Simplified) ArabicArabic

Copyright 2009 Tech-FAQ. All rights reserved. Privacy Policy.