Hi Everyone
My website has a simple embedded mp3 player (start, pause, stop) which works fine in IE but I now realise it doesn't work in all the other browsers and that ActiveX is only for IE (it was a pain having to instruct visitors to allow ActiveX to run anyway).
Is there a simple piece of code to use to embed an mp3 player (buttons etc) that works in IE, Firefox & Safari (and hopefully other browsers).
I have the software to change the format of the audio if needs be.

Recommended Answers

All 6 Replies

Use this sort of code.

<p><a href="song.mp3">Play Song</a></p>
<p><a href="liar.wav">Play Text</a></p>

<script type="text/javascript" src="http://mediaplayer.yahoo.com/js"></script>


commented: good response! +4

Anytime I am working on a web page that requires a media player, i use Yahoo's media player. It can even play video files as well. Take a look here: http://webplayer.yahoo.com/

As techite mentioned in his post, you just reference their external javascript file.

Hi Guys
Thanks for your help - I wasn't aware of Yahoo's media player.
The code is straight forward, which I like!!!
I've read up on your links so I'm gonna try it and see what it looks like.
Once again many thanks for your help.
Rock & Roll !!!

Hey Dave, good to hear that you liked it. It works great.

YaHoo Media player has been pulled - so NOW where do we go? I switched to...

<link href="https://googledrive.com/host/0B_k_F1io7Ljsc0tMNndjTnNJWWM" rel="stylesheet" /> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.6/jquery.min.js"></script> <script type="text/javascript" src="https://googledrive.com/host/0B_k_F1io7LjsRVZHY1dJUFpKdTg"></script>

...but it's buggy to say the least. Works when you click on the arrow buttons, but not when you click on the song titles.

Here's my page I've been struggling with - anyone who can help, please do!!

Why don't you try making your own mp3 player script ?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.