/    Sign up×
Community /Pin to ProfileBookmark

Windows Media Player doesnt work in Firefox!

I’ve been working on this script for the past week and it works great in IE and NS, but doesnt work in Firefox or Opera. Can you give the script a look over and tell me what i’ve been doing wrong. Thanks a bunch.

<SCRIPT LANGUAGE=”JavaScript”>
<!– Begin
var playstate = 1;
shuffle = 0; // set to 0 to always play first video in list
// set to 1 to randomly choose the first video to play
videos=new Array();
videos[0]=”archive/DSUEP1.wmv”;
videos[1]=”archive/DSR.EP2.wmv”;
videos[2]=”archive/DSR.EP3.wmv”;
videos[3]=”archive/DSR.EP4.wmv”;
videos[4]=”archive/DSR.EP5.wmv”;
if (shuffle == 1) {
var randsg = Math.floor(Math.random()*videos.length);
document.dsrmotion.FileName = videos[randsg];
document.dsrmotion.scr = videos[randsg];
document.forms[‘form’].playlist.options[randsg].selected = true;
}
function play(list) {
if (playstate == 2) {
document.dsrmotion.Play();
} else {
var snum = list.options[list.selectedIndex].value
document.dsrmotion.FileName = videos[snum];
document.dsrmotion.scr = videos[snum];
}
playstate = 1;
}
// End –>
</Script>

<object width=”220″ height=”160″ id=”dsrmotion” codebase=”http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701” type=”application/x-oleobject” standby=”Loading Microsoft Windows Media Player components…” classid=”CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95″>
<param name value>
<param name=”ShowControls” value=”0″>
<param name=”ShowStatusBar” value=”0″>
<param name=”ShowDisplay” value=”0″>
<param name=”DefaultFrame” value=”Slide”>
<param name=”Autostart” value=”1″>
<param name=”Loop” value=”False”>
<embed width=”220″ height=”160″ id=”dsrmotion” type=”video/x-ms-asf-plugin” transparentatstart=”true” SendOpenStateChangeEvents=”true” showstatusbar=”1″ showdisplay=”0″ autosize=”0″ autorewind=”0″ animationstart=”0″ autostart=”0″ showcontrols=”0″>
</object>

<form name=”form”>
<select style=”FONT-SIZE: 8pt; BACKGROUND:#transparent; WIDTH: 150px; COLOR: #33666; font-face: verdana” name=”playlist” size=”1″>
<option value=”0″>Video 1</option>
<option value=”1″>Video 2</option>
<option value=”2″>Video 3</option>
<option value=”3″>Video 4</option>
<option value=”4″>Video 5</option>
</select><br>
<img TYPE=”BUTTON” NAME=”darkplay” VALUE=”play” TITLE=”Play” OnClick=”play(document.forms[‘form’].playlist);” src=”images/playbutton.jpg” width=”27″ height=”26″>
<img TYPE=”BUTTON” NAME=”darkpause” VALUE=”pause” TITLE=”Pause” onClick=”document.dsrmotion.Pause(); playstate=2;” src=”images/pausebutton.jpg” width=”30″ height=”26″>
<img TYPE=”BUTTON” NAME=”darkstop” VALUE=”stop” TITLE=”Stop” OnClick=”document.dsrmotion.Stop(); playstate=2;” src=”images/stopbutton.jpg” width=”27″ height=”26″>
</form>

to post a comment
JavaScript

10 Comments(s)

Copy linkTweet thisAlerts:
@Warren86Mar 18.2005 — ..
Copy linkTweet thisAlerts:
@TheBearMayMar 18.2005 — Seems to me that when I had this problem I needed to add a reference to the plugins page. Try replacing your embed statement with:

[code=php]
<embed pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" width="220" height="160" id="dsrmotion" type="video/x-ms-asf-plugin" transparentatstart="true" SendOpenStateChangeEvents="true" showstatusbar="1" showdisplay="0" autosize="0" autorewind="0" animationstart="0" autostart="0" showcontrols="0"/>[/code]
Copy linkTweet thisAlerts:
@StevieGuy9authorMar 18.2005 — I appreciate your help, still stratching my head on why it wont work though.
Copy linkTweet thisAlerts:
@MellowMoodzMar 29.2005 — But I also am having issue's with Firefox. Was wondering if you could help make YOUR code work in Firefox. I have sent you a pm. Thanks for the time.
Copy linkTweet thisAlerts:
@BrainDonorMar 29.2005 — Are you running AdBlock?
Copy linkTweet thisAlerts:
@MellowMoodzMar 29.2005 — No.....no ad block...
Copy linkTweet thisAlerts:
@BrainDonorMar 29.2005 — Actually I was referring to both of you.
Copy linkTweet thisAlerts:
@zsivhawkMar 29.2005 — yeah, too bad this doesn't work with firefox (I just tried, and its not working...) nice code though warren!
Copy linkTweet thisAlerts:
@Warren86Mar 29.2005 — ..
Copy linkTweet thisAlerts:
@skateguy5Apr 27.2005 — i heard firefox isn't realy a good browser if you what to to that type of stuff but personaly i don't think fire fox is good at all scuse my speelinng
×

Success!

Help @StevieGuy9 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.4,
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,
)...