tags:

views:

2407

answers:

8

I am using following code to embed files, video with .wmv extension, that is not working in Firefox. It's working fine in IE.

document.getElementById("QuestionMedia").innerHTML += 
  '<OBJECT ID="MediaPlayer" WIDTH="350" HEIGHT="280" CLASSID="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95"STANDBY="Loading Windows Media Player components..." TYPE="application/x-oleobject">' + 
    '<PARAM NAME="FileName" VALUE="video/' + Question.Media + '">' +
    '<PARAM name="autostart" VALUE="false">' +
    '<PARAM name="ShowControls" VALUE="true">' +
    '<param name="ShowStatusBar" value="false">' +
    '<PARAM name="ShowDisplay" VALUE="false">' +
    '<EMBED TYPE="video/x-ms-wmv " SRC="video/' + Question.Media + '" NAME="MediaPlayer" WIDTH="350" HEIGHT="280" ShowControls="1" ShowStatusBar="0" ShowDisplay="0" autostart="1"> </EMBED>' + 
  '</OBJECT>';

Please let me know what would I do to make it work..?

A: 

You should have the Windows Media Player Plugin for Firefox to be able to see the video. WMV is a Microsoft/Media Player specific format and needs a plugin for the browser.

Slavo
+1  A: 

Yes, I have all those plugins. I checked through 'about:plugins', but it's still not playing.

A: 

Can't you have the video player object in the file and set it's SRC using JavaScript? That would be a [dirty] work-around if it's doable and you can't find the answer to your problem.

Tom
A: 

I am using tag and Set src="Video/' +Video name +'" but its not working

A: 

Hi,

I came across some one who had the problem in reverse - here was what worked for them in Firefox - it also worked for me in bith IE7 and Firefox.

Code is below:

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'> http://microsoft.com/windows/mediaplayer/en/download/' id='mediaPlayer' name='mediaPlayer' displaysize='4' autosize='-1' bgcolor='darkblue' showcontrols="true" showtracker='-1' showdisplay='0' showstatusbar='-1' videoborder3d='-1' width="704" height="573" src="../content/Video/video.wmv" autostart="true" designtimesp='5311' loop="true">

You would need to change the dimensions of your player to fit your requirements.

A: 

Why don't you use one of the available Open Source, thus free, open source solutions to embed the movie in the page.

This will solve the potential plugins problems (except the required Flash Player obviously) and work on any platform or browser.

titel

titel
A: 

I had a very similar problem with Firefox 3 on the PC. When I changed

<embed src="/media/video.wmv">

to

<embed src="http://mysite.com/media/video.wmv"&gt;

the problem suddenly went away for me. Go figure.

Devon
A: 

If you are using the VideoLAN plugin try uninstalling it. It has caused me nothing but trouble.