|
|
|
#1 (permalink) |
|
Messages: n/a
Hébergeur: |
My apology that the question may not all about php.
I am trying to embed a video clip on my web site. The code that I use as blow only works in IE: <object id="MediaPlayer" width="480" height="384" classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" codebase="http://activex.microsoft.com/activex/controls/mplayer/en/ nsmp2inf.cab#Version=6,4,5,715" border="0" standby="Loading Windows Media Player components..." type="application/x-oleobject"> <param name="FileName" value="myvideo.wmv" /> <param name="ShowControls" value="1" /> <param name="ShowPositionControls" value="1" /> <param name="ShowAudioControls" value="1" /> <param name="ShowStatusBar" value="1" /> <param name="AutoStart" value="0" /> <param name="AnimationAtStart" value="1" /> <param name="AllowScan" value="1" /> <param name="Volume" value="50" /> </object> In FireFox 2 it doesn't show anything. The next piece only works in Firefox. <object data="myvideo.wmv" type="video/x-ms-wmv" width="480" height="384"> <param name="ShowStatusBar" value="1"> <param name="src" value="myvideo.wmv"> <param name="autostart" value="0"> <param name="volume" value="0"> </object> In IE it shows as a broken img. How do I get one code to work in both? Where did I do wrong with the code? Thanks. |
|
|
|
#2 (permalink) |
|
Messages: n/a
Hébergeur: |
The IE code uses ActiveX to display the embedded content. ActiveX is a
microsoft technology which is not availabe on FF, that's why the code won't display on FF. The FF code is a more 'general' way of showing embedded things (I guess). Now, becuase I assume you DO use PHP, you can detect what is the browser that is visiting your site. If it's IE, paste the ActiveX cr@p. If it's something else, paste the FF code. Simple. Google for "PHP browser detection" or something similar. -- amir shawn wrote: > My apology that the question may not all about php. > > I am trying to embed a video clip on my web site. The code that I use > as blow only works in IE: > > <object id="MediaPlayer" width="480" height="384" > classid="CLSID:22D6F312-B0F6-11D0-94AB-0080C74C7E95" > codebase="http://activex.microsoft.com/activex/controls/mplayer/en/ > nsmp2inf.cab#Version=6,4,5,715" > border="0" > standby="Loading Windows Media Player components..." > type="application/x-oleobject"> > <param name="FileName" value="myvideo.wmv" /> > <param name="ShowControls" value="1" /> > <param name="ShowPositionControls" value="1" /> > <param name="ShowAudioControls" value="1" /> > <param name="ShowStatusBar" value="1" /> > <param name="AutoStart" value="0" /> > <param name="AnimationAtStart" value="1" /> > <param name="AllowScan" value="1" /> > <param name="Volume" value="50" /> > </object> > > In FireFox 2 it doesn't show anything. > > The next piece only works in Firefox. > > <object data="myvideo.wmv" type="video/x-ms-wmv" width="480" > height="384"> > <param name="ShowStatusBar" value="1"> > <param name="src" value="myvideo.wmv"> > <param name="autostart" value="0"> > <param name="volume" value="0"> > </object> > > In IE it shows as a broken img. > > How do I get one code to work in both? Where did I do wrong with the > code? > > Thanks. > |
|
![]() |
| Outils de la discussion | |
|
|