PDA

View Full Version : Resizing Embed Video Stream without Refresh


brunofms
23rd February 2005, 21:24
I'm trying to resize an embed video stream without a refresh. It works perfectly in IE. But in Firefox(Gecko) it doesn't work tough.

Here is my html/javascript file:

</font><blockquote>code:</font><hr /><pre style="font-size:x-small; font-family: monospace;">&lt;!DOCTYPE HTML PUBLIC &quot;-//W3C//DTD HTML 4.01 Transitional//EN&quot;&gt;

&lt;html&gt;
&lt;head&gt;
&lt;title&gt;
Testando...
&lt;/title&gt;
&lt;/head&gt;
&lt;body&gt;

&lt;script&gt;
function decrease(){
if(String(navigator.appName).indexOf('Explorer')== -1){
document.getElementById('MediaPlayerNt').width=120 ;
document.getElementById('MediaPlayerNt').height=10 5;
}else{
document.getElementById('MediaPlayer').width=120;
document.getElementById('MediaPlayer').height=105;
}
}
function increase(){
if(String(navigator.appName).indexOf('Explorer')== -1){
document.getElementById('MediaPlayerNt').width=240 ;
document.getElementById('MediaPlayerNt').height=21 0;
}else{
document.getElementById('MediaPlayer').width=240;
document.getElementById('MediaPlayer').height=210;
}
}
&lt;/script&gt;

&lt;div align=&quot;center&quot;&gt;
TESTing&lt;b&gt;17:32&lt;/b&gt;&lt;br&gt;&lt;hr&gt;&lt;br&gt;

&lt;OBJECT width=&quot;240&quot; height=&quot;210&quot;
ID=&quot;mediaPlayer&quot;
CLASSID=&quot;CLSID:22d6f312-b0f6-11d0-94ab-0080c74c7e95&quot;
CODEBASE=&quot;http://activex.microsoft.com/activex/controls/mplayer/en/nsmp2inf.cab#Version=5,1,52,701&quot;
// (The above two lines should be joined as one line.
// They have been split for formatting purposes.)
STANDBY=&quot;Loading Microsoft Windows Media Player components...&quot;
TYPE=&quot;application/x-oleobject&quot;&gt;
&lt;PARAM NAME=&quot;fileName&quot; VALUE=&quot;http://www.brturbo.com.br/parceiros/portacurtas/asx/uma_historia_de_futebol_dsl.asx&quot;&gt;
&lt;!-- (The above three lines should be joined as one line.
They have been split for formatting purposes.) --&gt;
&lt;PARAM NAME=&quot;animationatStart&quot; VALUE=&quot;false&quot;&gt;
&lt;PARAM NAME=&quot;transparentatStart&quot; VALUE=&quot;true&quot;&gt;
&lt;PARAM NAME=&quot;autoStart&quot; VALUE=&quot;true&quot;&gt;
&lt;PARAM NAME=&quot;showControls&quot; VALUE=&quot;false&quot;&gt;
&lt;!--PARAM NAME=&quot;autosize&quot; VALUE=&quot;true&quot;--&gt;
&lt;!--PARAM NAME=&quot;AllowChangeDisplaySize&quot; VALUE=&quot;-1&quot;--&gt;

&lt;!-- Mozilla, Opera, Firefox code--&gt;
&lt;embed id=&quot;MediaPlayerNt&quot; type=&quot;application/x-mplayer2&quot; width=&quot;240&quot; height=&quot;210&quot;
pluginspage=&quot;http://www.microsoft.com/windows/windowsmedia/&quot;
src=&quot;http://www.brturbo.com.br/parceiros/portacurtas/asx/uma_historia_de_futebol_dsl.asx&quot;
name=MediaPlayer
showcontrols=0
showdisplay=0
showstatusbar=0
autostart=1&gt;
&lt;/embed&gt;

&lt;/OBJECT&gt;

&lt;br&gt;&lt;br&gt;&lt;hr&gt;&lt;br&gt;

&lt;input type=&quot;button&quot; value=&quot;decrease&quot; onclick=&quot;decrease();&quot;&gt;
&lt;input type=&quot;button&quot; value=&quot;increase&quot; onclick=&quot;increase();&quot;&gt;

&lt;/div&gt;
&lt;/body&gt;
&lt;/html&gt;</pre>[/QUOTE]