View Full Version : Simple custom mp3 player

Feb 26th, 2009, 11:15 PM
Here is my vision.

I create a play button (play.jpg)
When people go to my website, they can click on the play button and it will play the song in the background.

I don't want it to open to a new page where quicktime or w/e plays it. I want it to play right there on the site with a click of a button.

Can this be done without flash or javascript?

Simple. Simple. Simple.

Thanks :)

Feb 27th, 2009, 01:16 AM
Can this be done without flash or javascript?

Only with the object (http://joliclic.free.fr/html/object-tag/en/) element.

Feb 27th, 2009, 03:47 AM
You would want to use a object element :thumbsup:


<object type="audio/x-wav" data="REPLACE WITH LOCATION" width="200" height="20">
<param name="src" value="data/test.wav">
<param name="autoplay" value="false">
<param name="autoStart" value="0">
<a href="REPLACE WITH LOCATION">play</a>

Feb 27th, 2009, 10:36 PM
Can you make it so that it plays it right there and doesn't open up a new page?

Feb 28th, 2009, 08:39 AM
that code gets placed in the location you want it to appear, If u want it to auto play just change the autoplay param to true and ur off to the races.

Mar 1st, 2009, 02:30 AM
But I mean, I don't want it to be that quicktime player or whatever it is. I want it to be just a play button that I created (like an image). Maybe even a pause, stop, etc. Is there a way to do this without flash or javascript?

Mar 1st, 2009, 05:26 PM
From the lack of responses I'm guessing this isn't possible...

Mar 1st, 2009, 08:58 PM
Cant be done, only way to have something like that is a flash player.

Mar 1st, 2009, 10:28 PM
Okay, well I'm trying to make it work in every browser for most every person. Should I go flash or Javascript or what?

Mar 1st, 2009, 10:29 PM
flash would be your best bet.

Mar 1st, 2009, 11:55 PM
Ok thanks. Do you know of any simple flash players that wouldn't take long to load you know what I mean? Just to play a single file.

Mar 2nd, 2009, 12:07 AM

Mar 2nd, 2009, 01:27 AM
Thanks :)

Mar 2nd, 2009, 04:24 AM
Hey I can't get that player to stop autostarting sometimes... rarely it doesn't and most of the time it does. Why is this?

<embed wmode="transparent" src="x3.swf?url=startupsnd.mp3&amp;autostart=false" quality="high" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" width="150" height="50"></embed>

btw putting another quotation mark before false doesn't change anything...

Mar 2nd, 2009, 04:56 AM
I think that one may be buggy, you can try this one

Mar 2nd, 2009, 04:51 PM
Awesome, that's better anyways, simple and to the point... Thanks. I'll give it a try.