我正在使用JS在流程的各个阶段隐藏和显示flash视频对象。该功能适用于所有浏览器,包括OSX 10.6上的Safari 5.1,但不适用于OSX 10.7上的Safari 5.1.3,5.1.4和5.1.5。它在页面上重新定位但仍然可见。
您可以看到问题here。
任何帮助真的很感激!
嵌入代码:
var swfVersionStr="10.2.0";
var xiSwfUrlStr="/video/expressInstall.swf";
var flashvars={
sToken:"#{@stream_name}",
sSWFPath: "/video/Recorder.swf",
sConfigPath: "#{current_recorder_config_file}"
};
var params={
bgcolor:"#FFFFFF",
allowfullscreen:"true",
allownetworking:"all",
allowscriptaccess:"always",
base:".",
devicefont:"false",
menu:"false",
play:"true",
quality:"high",
salign:"tl",
scale:"showall",
seamlesstabbing:"false",
swliveconnect:"true",
wmode:"window"
};
var attributes={
id:"Recorder",
name:"Recorder"
};
swfobject.embedSWF("/video/Recorder.swf", "flashContent", "384", "318", swfVersionStr, xiSwfUrlStr, flashvars, params, attributes);
JS for Hide and Show:
function hideVideo() {$('.step_video, #flashContent').css({visibility:'hidden', height:1})}
function showVideo() {$('.step_video, #flashContent').css({visibility:'visible', height:'auto'})}
答案 0 :(得分:0)
在你不应该隐藏它之前已经有过这个bug,这是flash的一个bug。 我的解决方法是:
position: absolute;
left: -5000px;