作者热门文章
- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试在基于Flex 4的项目中使用Youtube Chromeless Player(新的AS3版本)。我正在使用Google的examples provided,但没有运气。播放器已加载,但无法与之交互。我只是因为将鼠标悬停在播放器上而收到重复的安全错误:
*** Security Sandbox Violation ***
SecurityDomain 'http://www.youtube.com/apiplayer?version=3' tried to access
incompatible context 'file:///Users/jbuhler/Sites/YoutubeTests/bin-debug/YoutubeTest.html'
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
initialize="onInit()">
<fx:Declarations>
<!-- Place non-visual elements (e.g., services, value objects) here -->
</fx:Declarations>
<fx:Script>
<![CDATA[
private function onInit ():void
{
Security.allowDomain("www.youtube.com");
}
]]>
</fx:Script>
<mx:SWFLoader source="http://www.youtube.com/apiplayer?version=3" />
</s:Application>
最佳答案
我认为该错误来自YouTube,请在此处查看我的答案:
How to avoid Security Errors when using the Youtube AS3 Player API
关于apache-flex - 使用Youtube AS3 Chromeless Player的安全性错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/3189659/
我是一名优秀的程序员,十分优秀!