[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 521
  • Last Modified:

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?
0
Reece Dodds
Asked:
Reece Dodds
  • 5
  • 3
  • 2
2 Solutions
 
karnapuneCommented:
hI,

You can achieve this by using XSPF Web Music Player (Flash) - Plays MP3 on your website
Below is the link for downloading the tool

http://musicplayer.sourceforge.net/

Also you can embed windows media player to your website by doing some modification to your website html code.Instructions for doing this are given at below lonk

http://www.geekpedia.com/tutorial152_Embedding-Windows-Media-Player-into-a-web-page.html

Regards,
Karna
0
 
Reece DoddsAuthor Commented:
which method is quickest to load and least intrusive?
0
 
karnapuneCommented:
I think XSPF Web Music Player  will be better
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
Reece DoddsAuthor Commented:
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???
0
 
Reece DoddsAuthor Commented:
OK, i think I have the xspf created, but when I test it it just sits there saying "loading playlist..."

the server this website is running on is one of my own.  Do I need to set up anything in IIS (like MIME types) for this to work?
The mp3's are in the same folder as the .swf and .xspf files...

thanks again
0
 
keyuCommented:
<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>
0
 
keyuCommented:
set autostart variable value true and pass it inside your parameter
0
 
Reece DoddsAuthor Commented:
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!
0
 
Reece DoddsAuthor Commented:
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]
0
 
keyuCommented:
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
0

Featured Post

New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

  • 5
  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now