Resizing Embed Video Stream without Refresh

No replies
brunofms
Offline
Joined: Feb 23 2005

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:

code:<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html>
<head>
<title>
Testando...
</title>
</head>
<body>

<script>
function decrease(){
if(String(navigator.appName).indexOf('Explorer')==-1){
document.getElementById('MediaPlayerNt').width=120;
document.getElementById('MediaPlayerNt').height=105;
}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=210;
}else{
document.getElementById('MediaPlayer').width=240;
document.getElementById('MediaPlayer').height=210;
}
}
</script>

<div align="center">
TESTing<b>17:32</b><br><hr><br>

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

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

</OBJECT>

<br><br><hr><br>

<input type="button" value="decrease" onclick="decrease();">
<input type="button" value="increase" onclick="increase();">

</div>
</body>
</html>