Link to home
Start Free TrialLog in
Avatar of Reece
ReeceFlag for Australia

asked on

add music player to website

I'm developing a website for a local sporting club and would like to add a music player to the website.  I'd like to have it play/pause/mute and skip between 5 different tracks (this is not essential though).
I'd like it to be able to play automatically on page load and randomise the song it plays each load.
What can I use to acheive this?
ASKER CERTIFIED SOLUTION
Avatar of karnapune
karnapune
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of Reece

ASKER

which method is quickest to load and least intrusive?
I think XSPF Web Music Player  will be better
Avatar of Reece

ASKER

ok... how on earth do I use the xspf option?   I like the look of the player.
I have 5 mp3 files that I can store in my website's "music" directory.
I have the following code on my home page...

<object type="application/x-shockwave-flash" width="400" height="170"
data="http://mydomain.org.au/music/xspf_player.swf?playlist_url=http://mydomain.org.au/music/ftbaplaylistlist.xspf">
<param name="movie"
value="http://mydomain.org.au/music/xspf_player.swf?playlist_url=http://mydomain.org.au/music/ftbaplaylistlist.xspf" />
</object>

now what??
how do I make the xspf file and how does it use my 5 mp3's???
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
<OBJECT id="VIDEO" width="320" height="240"
      style="position:absolute; left:0;top:0;"
      CLASSID="CLSID:6BF52A52-394A-11d3-B153-00C04F79FAA6"
      type="application/x-oleobject">
      
      <PARAM NAME="URL" VALUE="your file or url">
      <PARAM NAME="SendPlayStateChangeEvents" VALUE="True">
      <PARAM NAME="AutoStart" VALUE="True">
      <PARAM name="uiMode" value="none">
      <PARAM name="PlayCount" value="9999">
</OBJECT>
set autostart variable value true and pass it inside your parameter
Avatar of Reece

ASKER

any idea on why it just sits there with "loading playlist..." ???

The code I have used for the xspf is:

<?xml version="1.0" encoding="UTF-8"?>
<playlist version="0" xmlns = "http://xspf.org/ns/0/">
<trackList>
<track>
<location>http://mysite.org.au/music/alexisonfire-thiscouldbeanywhere.mp3</location>
<image></image>
<annotation>Alexisonfire - This Could Be Anywhere In The World</annotation>
</track>
<track>
<location>http://mysite.org.au/music/metallica-one.mp3</location>
<image></image>
<annotation>Metallica - One</annotation>
</track>
<track>
<location>http://mysite.org.au/music/kanyewest-gottahaveit.mp3</location>
<image></image>
<annotation>Kanye West - Gotta Have It</annotation>
</track>
<track>
<location>http://mysite.org.au/music/pendulum-witchcraft.mp3</location>
<image></image>
<annotation>Pendulum - One</annotation>
</track>
<track>
<location>http://mysite.org.au/music/nero-guilt.mp3</location>
<image></image>
<annotation>Nero - Guilt</annotation>
</track>
</trackList>
</playlist>

The files are definately there because if I use one of the url's in a web browser, the song loads and plays with quicktime (in IE9).

Please help!
Avatar of Reece

ASKER

I've requested that this question be closed as follows:

Accepted answer: 500 points for karnapune's comment http:/Q_27408091.html#37004265
Assisted answer: 0 points for reecem27's comment http:/Q_27408091.html#37004691

for the following reason:

don't worry - I got it sorted!<br /><br />In case you are wondering... &nbsp;I did need to add a MIME type in IIS for the .xspf &nbsp; <br />It was [b]application/xspf+xml [/b]
try this link might help you

http://lacymorrow.com/projects/xspfwmp/xspfdoc.html

and try to set

autoplay : boolean value that makes the playlist load and the music start without the initial user click
autoload : boolean value that makes the playlist load without the initial user click


parameter which helps you