HTML Embed object has a grey background. Can it be transparent?

Frank picture Frank · Sep 4, 2012 · Viewed 7.6k times · Source

I'm using Firefox with an opensource plugin to playback video. The video is scaled "as good as possible" to fit the available space defined in the width and height of the embed object. But sometimes there is a little grey border on the right and/or bottom.

It seems this isn't the bgcolor of my parent div as changing it has no effect at all.

This is the HTML:

<div id="videoHolder" style="position: absolute; left: 50px; top: 50px; width: 300px; height: 150px;">
 <embed id="player" width="300" height="150" border="0" type="application/x-gbp" x-gbp-uri="">
</div>

Anyone knows of a way to define an embed to be transparent? Setting wmode=transparent as with Flash has no effect...

Thanks, Frank

Answer

Georg Fritzsche picture Georg Fritzsche · Jan 31, 2013

There is no general way to tell plugin elements to be transparent from the browser-side, plugins need to support that themselves in their native code.

For Flash setting the wmode="transparent" works, but only because Flash implements that itself.