Flash无法在iframe中显示

时间:2012-01-09 17:12:26

标签: html flash iframe

我有一个flash视频播放器,我想嵌入其他页面,所以我创建了一个iframe来执行此操作。它必须是iframe,因为它依赖于加载到其中的其他swf文件(插件)。

奇怪的是视频在iframe中加载时无法播放,但是如果我转到html源并将标签剪切并粘贴到iframe之外就可以了。

<iframe width="500px" height="500px" src="http://somedomain.com/embed.aspx" ></iframe>

2 个答案:

答案 0 :(得分:2)

检查您的控制台。如果您还遇到这些错误:

&#34;在&#39; ...&#39;中阻止脚本执行因为文档的框架是沙盒的,并且“允许 - 脚本”#39;未设置权限。&#34;

您可以在iframe上配置这些沙盒标志

<iframe width="100%" sandbox='allow-scripts allow-same-origin'></iframe>

答案 1 :(得分:0)

通过将css添加到包含flash播放器的html页面来实现它。似乎绝对定位完全不同。

html, body, object { margin: 0px; padding: 0px; position: absolute; height: 100%; width: 100%; overflow: hidden; background-color: #000; }
相关问题