/    Sign up×
Community /Pin to ProfileBookmark

embedded media player.

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.

[code=php]<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/>[/code]

Any advice is appreciated.
Thanks

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@gil_davisJan 04.2008 — 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.
Copy linkTweet thisAlerts:
@ss1289authorJan 10.2008 — 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.
Copy linkTweet thisAlerts:
@gil_davisJan 10.2008 — 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.
Copy linkTweet thisAlerts:
@ss1289authorJan 10.2008 — 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.[/QUOTE]

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.
[CODE]<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/>[/CODE]

I guess with the <embed> tag I can't change the song in Firefox.
Copy linkTweet thisAlerts:
@gil_davisJan 11.2008 — 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
Copy linkTweet thisAlerts:
@LeeUJan 11.2008 — Here's another one that may help also. It's a generator.
×

Success!

Help @ss1289 spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.1,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,

tipper: @Samric24,
tipped: article
amount: 1000 SATS,
)...