我正在尝试通过以下 javascript 代码将 swf 文件嵌入页面 ( google app engine page):
<script type="text/javascript">
//This example uses dynamic publishing with swfObject. Login is handled in the swf
//Note we are passing in attribute object with a 'name' property that is same value as the 'id'. This is REQUIRED for Chrome/Mozilla browsers
swfobject.embedSWF("loader.swf", "flashContent", "640", "480", "10.2", null, null, null, {name:"flashContent"});
//REST OF THE CODE
</script>
它在 HTTP 上正常工作, 但内容不适用于 HTTPS .我在谷歌上搜索了很多,但没有找到解决方案。我需要使用 HTTPS 作为 Secure Canvas URL 来创建 facebook 应用程序。正如您在下面的评论中看到的,https 在 safari 上有效,但在 Chrome 中无效。
任何想法将不胜感激。
最佳答案
我可以看到 https://radmahdi.appspot.com/facebook/userstatusweb/index.html一旦您按照我在评论中的建议将指向 swfobject 的链接从 HTTP 更改为 HTTPS,现在就可以为您工作了:)
你可以做
//ajax.googleapis.com/ajax/libs/swfobject/2.2/swfobject.js
作为您的链接,在这种情况下,使用的协议(protocol)将与加载的页面相关。这可能更整洁。
如果您对解决方案感到满意,请将问题标记为已回答。
关于javascript - swfobject 不适用于 Chrome 中的 https,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14916508/