embed flash is not displayed. But it appears after editing html with firebug.
I have added a embed tag with a .swf file which reproduce a .flv video. The thing is that it works fine in all browser except Firefox. i tried to debug it using firebug, and what i found is, that aditing the embed using firebug without modifying the code just adding a space after the embed, the video start displaying.
All Replies (3)
Can you post a link to that web site or post a relevant part of the code?
this is part of the code:
<object height="200" width="290" classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" id="mediaPlayerIe">
<param value="Player.swf" name="movie">
<param value="high" name="quality">
<param value="objectID=mediaPlayer&confFile=videoConf.xml&media=<data><type>video</type><file><![CDATA[my_video.flv]]></file><image><![CDATA[my_image.jpg]]></image></data>" name="FlashVars">
<param value="#f4f4f4" name="bgcolor">
<param value="true" name="menu">
<param value="transparent" name="wmode">
<param value="sameDomain" name="allowScriptAccess">
<param value="true" name="allowFullScreen">
<embed height="200" width="290" swliveconnect="true" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash" allowfullscreen="true" allowscriptaccess="sameDomain" menu="true" flashvars="objectID=mediaPlayer&confFile=videoConf.xml&media=<data><type>video</type><file><![CDATA[my_video.flv]]></file><image><![CDATA[my_image.jpg]]></image></data>" bgcolor="#f4f4f4" wmode="transparent" quality="high" id="mediaPlayerMz" src="Player.swf">
</object>
i hope this can help.
Ilungisiwe
I've run into a similar problem with YouTube videos which I've been able to fix with a Greasemonkey script. (Videos on the home page of YouTube lack a wmode attribute and Flash video renders as a grey box without it. I found that by adding wmode through Firebug the video would start to play.)
To get the script to work, I had to force to the browser to reload the element, which is what appears to happen when editing in in Firebug.
This affects me in Firefox 3.6 and 4.0 (Ubuntu Linux 10.04).
Greasemonkey script:
// ==UserScript==
// @name YouTube fix
// @namespace http://lukemorton.com.au
// @description Set the wmode attribute for YouTube videos
// @include http://www.youtube.com/watch*
// ==/UserScript==
var allEmbeds, thisEmbed;
allEmbeds = document.evaluate(
"//embed",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allEmbeds.snapshotLength; i++)
{
thisEmbed = allEmbeds.snapshotItem(i);
thisEmbed.setAttribute('wmode', 'opaque')
thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
}
<script type="text/javascript">
var allEmbeds, thisEmbed;
allEmbeds = document.evaluate(
"//embed",
document,
null,
XPathResult.UNORDERED_NODE_SNAPSHOT_TYPE,
null);
for (var i = 0; i < allEmbeds.snapshotLength; i++)
{
thisEmbed = allEmbeds.snapshotItem(i);
thisEmbed.setAttribute('wmode', 'transparent')
thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
}
</script>
<script type="text/javascript">
thisEmbed = document.getElementById('mediaPlayerMz');
thisEmbed.setAttribute('wmode', 'transparent')
thisEmbed.parentNode.replaceChild(thisEmbed.cloneNode(true), thisEmbed);
</script>
Sorry about all the links, I couldn't find a way to disable them (<nowiki> doesn't seem to work).
Copying and distribution of this software, with or without modification, are permitted in any medium without royalty provided the copyright notice and this notice are preserved. This file is offered as-is, without any warranty.
Ilungisiwe