JavaScript Development
 
Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
 
User Name:
Password:
Remember me
 
Go Back   Dev Articles Community ForumsProgrammingJavaScript Development

Reply
Add This Thread To:
  Del.icio.us   Digg   Google   Spurl   Blink   Furl   Simpy   Y! MyWeb 
Thread Tools Search this Thread Display Modes
 
Unread Dev Articles Community Forums Sponsor:
SlickEdit: Code in over 40 languages across 7 platforms. SlickEdit’s unmatched power, speed, and flexibility allows even the most accomplished developers to write better code faster. Download a free trial today!
  #1  
Old March 17th, 2005, 08:28 PM
StevieGuy9 StevieGuy9 is offline
Registered User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Mar 2005
Posts: 1 StevieGuy9 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 12 m 4 sec
Reputation Power: 0
Windows Media Player 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. I think it has something to do with the <embed> and the JavaScript.
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>

Reply With Quote
  #2  
Old March 18th, 2005, 07:47 AM
MadCowDzz's Avatar
MadCowDzz MadCowDzz is offline
I'm Internet Famous
Dev Articles Frequenter (2500 - 2999 posts)
 
Join Date: Jan 2003
Location: Toronto, Canada
Posts: 2,890 MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level)MadCowDzz User rank is Lance Corporal (50 - 100 Reputation Level) 
Time spent in forums: 1 Week 16 h 4 m 48 sec
Reputation Power: 8
It looks like one of your tags is calling an ActiveX control.
One of Firefox's "key features" is it's ability to NOT use ActiveX controls =)

I doubt there's anything malicious with the MediaPlayer control, but there are often malicious ActiveX controls written by some bad-natured programmer.

After Google'ing, I did find a way to get controls to work in Firefox, but your user has to do it... there's nothign you can do from a website perspective that will allow this to work.

Read a solution here: http://forums.mozillazine.org/viewtopic.php?t=206213

Aside from this, it is my understanding that Firefox doesn't co-operate with ActiveX controls.

Reply With Quote
  #3  
Old March 18th, 2005, 12:06 PM
ChiefWigs1982's Avatar
ChiefWigs1982 ChiefWigs1982 is offline
Contributing User
Dev Articles Newbie (0 - 499 posts)
 
Join Date: Jan 2005
Location: I have emerged from the place of spells and fairies
Posts: 97 ChiefWigs1982 User rank is Just a Lowly Private (1 - 20 Reputation Level) 
Time spent in forums: 2 Days 17 h 35 m 12 sec
Reputation Power: 4
ActiveX plugins can be installed in FireFox [Clicky...], but still, you'd
be better off offering your content in more than one format, i.e. have
it as a .rm or .mov as well as your .wmv, and then ask the user what
type of player they want to use, and load it accordingly.

Reply With Quote
Reply

Viewing: Dev Articles Community ForumsProgrammingJavaScript Development > Windows Media Player in FireFox


Thread Tools  Search this Thread 
Search this Thread:

Advanced Search
Display Modes  Rate This Thread 
Rate This Thread:


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
View Your Warnings | New Posts | Latest News | Latest Threads | Shoutbox
Forum Jump


Forums: » Register « |  User CP |  Games |  Calendar |  Members |  FAQs |  Sitemap |  Support | 
  
 





© 2003-2008 by Developer Shed. All rights reserved. DS Cluster 6 hosted by Hostway