Hi, I want to enable users of a site, to play a selection of mp3 samples. Presently I have embedded windows media player but in IE it opens up QT when the selection is made, making site design difficult.
How can I code my page so that opening a music sample, opens the media player set in the users browser?
11-25-2006, 05:50 PM
What is the code you are using to embed the song?
I have gone through the sticky several times and still don't see what I am getting wrong.
document.getElementById('music1').innerHTML="<embed type='application/x-mplayer2' id='music2' pluginspage='http://www.microsoft.com/Windows/MediaPlayer/' src='"+document.getElementById('samples').value+"' name='MediaPlayer1' width='250' height='50' controltype='2' showcontrols='1' showstatusbar='1' AutoStart='true'></embed>";
This is the select part in the xhtml
<select id="samples" onchange="song()" size="1">
<option value="none">::::::::::::: Choose Your Song Here :::::::::::::</option>
<option value="http://mydomain.com/ProMusic/Annie Laurie.mp3">Annie Laurie.mp3</option>
and this is the code for the media player.
<span id="music1"><embed type="application/x-mplayer2" id="music1"
Any help you can give willl be much appreciated
11-27-2006, 05:43 PM
I don't think you've gone through the sticky as much as you should have. If you had you would have seen this post
It uses wmv but can made to use mp3 by changing the extension in the code.
Thank you very much. I have it working now in IE but not in FF. Is there any way to make it work in both browsers?
11-28-2006, 05:43 AM
If you used the same code I provided and not tried to modify an existing script you had then it should work both in IE and Firefox. Perhaps you should post a link to your page. Its clear you aren't doing something correctly.
Oh dear. I have looked again this morning and still can't see what's wrong.
here's the location of the page.
http:// w w w . cara-harpist.co.uk/cgi-bin/musicSamples?baseBusiness=Cara-Harpist_Performers_Musical_Harpist_Bangor_County-Down_351045382618_BT20-5HA_Cara-Harpist_North-Down-Tourism_1_Performers_Christine-Evans
Oops, I forgot I've been spoofing my browser. I'll activate the domain and post again.
still can;t see what;s wrong and now the domain is active so you can see it work in IE but not in FF.
Any tips greatly welcomed.