views:

14

answers:

2

Hellogain, this time I have a page which will load different kinds of file formats, well... i use a switch with php to load the correct player according to the filetype. But when I try to load a wmv file, the video automatically grows and exceeds the allowed size that i gave the player... i don't know how to prevent that. Here is my code:

<object classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" width="480" height="360" codebase="http://www.microsoft.com/Windows/MediaPlayer/"&gt;
<param name="Filename" value="files/' . $file . '">
<param name="AutoStart" value="true">
<param name="ShowControls" value="true">
<param name="BufferingTime" value="2">
<param name="ShowStatusBar" value="true">
<param name="AutoSize" value="false">
<param name="InvokeURLs" value="false">
<embed src="files/' . $file . '" type="application/x-mplayer2" autostart="1" enabled="1" showstatusbar="1" showdisplay="1" showcontrols="1" pluginspage="http://www.microsoft.com/Windows/MediaPlayer/" CODEBASE="http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=6,0,0,0" width="480" height="360"></embed>

Well, I thought the solution was to change "AutoSize" value, i tried false and true, but it keeps doing it. Any ideas?

A: 

Ok, I did some research and i found that it has to do something with the classid="clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95" i don't know exactly what it does, but when i changed that to clsid:05589FA1-C356-11CE-BF01-00AA0055595A, the player stopped resizing. The problem is, that for some reason, when it loads whatever information it takes from the microsoft page, it adds the following style to my code: style="WIDTH: 640px; HEIGHT: 549px; TOP: 13px; LEFT: 43px" and also changes the size and width of the video.

Would be nice if someone could help me research this.

Andres Bedoya
A: 

Perhaps if you set width: 100% and ensured that any DIV it's in was also 100% that might do the trick. If not, try style="width:100% !important" to override the extra styling code being added.

I use Developer Tools in Chrome (or IE9 or Firebug) to change the styles on the object interactively and see the results immediately.

harvest316
Good idea the !important thing. Will try that.
Andres Bedoya