Click to See Complete Forum and Search --> : embedded media player.


ss1289
01-03-2008, 04:57 PM
I have an embedded media player with a selection of multiple songs, but I can't get the radio buttons to work in firefox. It works great in IE, but in Firefox, whenever you select a radio button to play a different song, it doesn't change the song. It all works fine except that it doesn't change the song and only plays the initial song when the page is first opened.

Here is what I have so far.

<OBJECT id=music height=70 width=230 classid='CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95'
codebase='http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701'
standby='Loading Microsoft Windows Media Player components...' type='application/x-oleobject'>
<!-- Change to value=0 to hide status -->
<param name='fileName' value="http://www.wrecknrecords.com/organizedrhymes/audio/atx.wma">
<param name="ShowStatusBar" value="1">
<param name="AudioStream" value="-1">
<param name="AutoSize" value="1">
<param name="AnimationAtStart" value="1">
<param name="AllowScan" value="-1">
<param name="AllowChangeDisplaySize" value="-1">
<param name="AutoRewind" value="-1">
<param name="Balance" value="0">
<param name="BufferingTime" value="5">
<param name="ClickToPlay" value="-1">
<param name="CursorType" value="0">
<param name="CurrentPosition" value="-1">
<param name="CurrentMarker" value="0">
<param name="DisplayBackColor" value="0">
<param name="DisplayForeColor" value="16777215">
<param name="DisplayMode" value="0">
<param name="DisplaySize" value="0">
<param name="Enabled" value="-1">
<param name="EnableContextMenu" value="-1">
<param name="EnablePositionControls" value="-1">
<param name="EnableFullScreenControls" value="0">
<param name="EnableTracker" value="-1">
<param name="InvokeURLs" value="-1">
<param name="Language" value="-1">
<param name="Loop" value="0">
<param name="Mute" value="0">
<param name="PlayCount" value="1">
<param name="PreviewMode" value="0">
<param name="Rate" value="1">
<param name="SelectionStart" value="-1">
<param name="SelectionEnd" value="-1">
<param name="SendOpenStateChangeEvents" value="-1">
<param name="SendWarningEvents" value="-1">
<param name="SendErrorEvents" value="-1">
<param name="SendKeyboardEvents" value="0">
<param name="SendMouseClickEvents" value="0">
<param name="SendMouseMoveEvents" value="0">
<param name="SendPlayStateChangeEvents" value="-1">
<param name="ShowCaptioning" value="0">
<param name="ShowControls" value="-1">
<param name="ShowAudioControls" value="-1">
<param name="ShowDisplay" value="0">
<param name="ShowGotoBar" value="0">
<param name="ShowPositionControls" value="-1">
<param name="ShowTracker" value="-1">
<param name="TransparentAtStart" value="1">
<param name="VideoBorderWidth" value="0">
<param name="VideoBorderColor" value="0">
<param name="VideoBorder3D" value="0">
<param name="Volume" value="0">
<param name="WindowlessVideo" value="0">
<EMBED type="application/x-mplayer2" pluginspage="http://www.microsoft.com/Windows/Downloads/Contents/Products/MediaPlayer/" src="http://www.wrecknrecords.com/organizedrhymes/audio/atx.wma" name="MediaPlayer" autostart="true" loop="false" height=70 width=230></EMBED>
</OBJECT>
<br/>
<INPUT id=song1 onclick=document.all.music.filename=document.all.song1.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/atx.wma" CHECKED> ATX<br/>
<INPUT id=song2 onclick=document.all.music.filename=document.all.song2.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/dothedamnthing.wma"> Do The Damn Thing<br/>
<INPUT id=song3 onclick=document.all.music.filename=document.all.song3.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/feedoffthat.wma"> Feed Off That<br/>
<INPUT id=song4 onclick=document.all.music.filename=document.all.song4.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/hitthedancefloor.wma"> Hit The Dance Floor<br/>
<INPUT id=song5 onclick=document.all.music.filename=document.all.song5.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/letmeseeyoubounce.wma"> Let Me See You Bounce<br/>
<INPUT id=song6 onclick=document.all.music.filename=document.all.song6.value; TYPE="RADIO" NAME="Music" VALUE="http://www.wrecknrecords.com/organizedrhymes/audio/supadupa.wma"> Supa Dupa<br/>

Any advice is appreciated.
Thanks

gil davis
01-04-2008, 06:46 AM
I believe you need an plug-in for FireFox to be able to use Windows MediaPlayer. I think Microsoft stopped making it after version 6, and may no longer be available. You should look for another way for FireFox to play audio, maybe RealPlayer, QuickTime or the like. Search Mozilla.org or Netscape for compatible audio plug-ins.

Major Payne
01-04-2008, 07:30 AM
Common Plugins for Firefox (https://addons.mozilla.org/en-US/firefox/browse/type:7)

Ron

ss1289
01-09-2008, 10:55 PM
The media player works in firefox but the onclick function for selecting another song isn't working. It give me a document.all has no properties error. In Firefox I can get it to play the file from the embed object I have but when I click on another song (radio button) it won't change the filename. But in IE it all works perfectly. It's driving me crazy because I can't find any other way to play multiple songs in a media player.

gil davis
01-10-2008, 05:42 AM
FireFox does not support "document.all". That is a proprietary implementation in Microsoft browsers. Use "document.getElementById()" and you will be able to support FF, Opera, Safari *and* IE.

ss1289
01-10-2008, 05:21 PM
FireFox does not support "document.all". That is a proprietary implementation in Microsoft browsers. Use "document.getElementById()" and you will be able to support FF, Opera, Safari *and* IE.

OK, I tried that and it still doesn't work, but it doesn't show an error at least.

I have this at the button now.
<input id="song2" onclick="document.getElementById('music').filename=document.getElementById('song2').value" type="radio" name="Music" value="http://www.wrecknrecords.com/organizedrhymes/audio/atx.wma"> ATX</INPUT><br/>

I guess with the <embed> tag I can't change the song in Firefox.

gil davis
01-11-2008, 07:18 AM
For FF to work, you have to manipulate the EMBED. You are only manipulating the OBJECT. However, there is more involved. Here is a link to some more info that may help:

http://developer.mozilla.org/en/docs/Windows_Media_in_Netscape

LeeU
01-11-2008, 10:34 AM
Here's another one (http://cit.ucsf.edu/embedmedia/step1.php) that may help also. It's a generator.