RE: resizing Mediaplayer object in FireFox

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance




It does not work,yet.
"Alex" wrote:

Dear reader,

I solved the problem with a small work around.
But first I have to say that the javascript code above is not correct. It
should have been

highSpeed.width = newWidth;
highSpeed.height = newHeight;
var e = highSpeed.getElementsByTagName("embed")[0];
if (e != null)
{
e.width = newWidth;
e.height = newHeight;
}

But anyway this doesn't really matter. So let's take a look at my soloution.
The mediaplayer object plugin has a variable called "vspace" which holds the
space between the video's top and the player's top. By default it is "-1".
What I do is the following.
I set this value to "1", which means it will be a space between the video's
top and the player's top of 1 pixel. Then I create a timeout of a few
milliseconds that restores the default value. This does the trick.

highspeed.vspace = 1; setTimeout("highspeed.vspace = -1;",20);

So I hope I could help someone having a similar problem.
greetings,
Alex
.



Relevant Pages