我使用下面的swfobject代码在我的页面上嵌入了flash对象:
flashVars =
appMode: appMode
callback: "function(){app.broadcaster.webcam.emit.apply(app.broadcaster.webcam, arguments);}"
params =
quality: "high"
bgcolor: "#ffffff"
wmode: "transparent"
allowscriptaccess: "always"
allowfullscreen: "true"
allowNetworking: "all"
allowFullScreenInteractive: true
attributes =
id: id
name: id
align: "middle"
classid: "clsid:d27cdb6e-ae6d-11cf-96b8-444553540000"
args = [
"/bin-release-v2/fApp_1_9_beta4.swf"
id
"464"
"348",
"11.1.0"
"/bin-release/playerProductInstall.swf"
flashVars
params
attributes
(e) =>
app.log "embedded player!", "broadcaster"
$el = $ e.ref
webcam = WebcamBroadcaster.create $el
@emit "embed", webcam
deferred.resolve webcam
]
swfobject.embedSWF args...
一切正常,我可以在对象上调用方法(包括在IE9中)但我随机得到这个错误:
document.getElementById("webcam").setReturnValue("<undefined/>")
SCRIPT 5007: Unable to get value of the property 'SetReturnValue': object is null or undefined
我正在开发基于socket.io的广播网站,这种情况发生在客户端。
当广播公司断开连接时,闪存对象将从客户端移除,并在连接时再次嵌入。
是否可以快速删除/嵌入闪存并且IE9浏览器速度较慢?
答案 0 :(得分:0)
移动/隐藏包含SWF对象的DOM元素会导致重新嵌入,因此不能同时调用其方法。