Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/flash/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Actionscript 3 Flash的YouTUBE API不工作_Actionscript 3_Flash_Youtube_Youtube Api_Youtube Data Api - Fatal编程技术网

Actionscript 3 Flash的YouTUBE API不工作

Actionscript 3 Flash的YouTUBE API不工作,actionscript-3,flash,youtube,youtube-api,youtube-data-api,Actionscript 3,Flash,Youtube,Youtube Api,Youtube Data Api,我们有一个浏览器flash应用程序,它加载YouTube嵌入式AS3播放器来播放一些YouTube视频() 是的,我知道Flash API已经过时,Flash正在消亡,等等。但它是目前我们复杂的3D图形创作工具的唯一实用平台,就像一个功能播放YouTube视频一样;强迫我们的客户在Vimeo上主持他们的视频来回答这个问题是疯狂的 到目前为止,一切都很正常(代码或服务器没有变化),直到2周前,我们无法从应用程序播放YouTube视频 我发现我们目前使用的url格式出现了一个文件未找到错误: htt

我们有一个浏览器flash应用程序,它加载YouTube嵌入式AS3播放器来播放一些YouTube视频()

是的,我知道Flash API已经过时,Flash正在消亡,等等。但它是目前我们复杂的3D图形创作工具的唯一实用平台,就像一个功能播放YouTube视频一样;强迫我们的客户在Vimeo上主持他们的视频来回答这个问题是疯狂的

到目前为止,一切都很正常(代码或服务器没有变化),直到2周前,我们无法从应用程序播放YouTube视频

我发现我们目前使用的url格式出现了一个文件未找到错误:

http://www.youtube.com/v/<my video code>?version=3&autoplay=1
它抛出以下错误:

*** Security Sandbox Violation ***
SecurityDomain http://<my app url> tried to access incompatible context 'https://www.youtube.com/v/<my video code>?version=3&autoplay=1'
SecurityError: Error #2121: Security sandbox violation: LoaderInfo.content: http://<my app url> cannot access https://www.youtube.com/v/<my video code>?version=3&autoplay=1. This may be worked around by calling Security.allowDomain.
现在它甚至不触发
事件。完成
事件。只有
SecurityErrorEvent.SECURITY\u ERROR
事件,因此未加载任何内容:

*** Security Sandbox Violation ***
Connection to https://www.youtube.com/v/<my video code>?version=3&autoplay=1 halted - not permitted from http://<my app url>
httpStatus (error): [HTTPStatusEvent type="httpStatus" bubbles=false cancelable=false eventPhase=2 status=0 redirected=true responseURL=null]
SecurityError: 
[SecurityErrorEvent type="securityError" bubbles=false cancelable=false eventPhase=2 text="Error #2048: Security sandbox violation: http://<my app url> cannot load data from https://www.youtube.com/v/<my video code>?version=3&autoplay=1."]
***安全沙盒冲突***
连接到https://www.youtube.com/v/?version=3&autoplay=1 暂停-不允许从http://
httpStatus(错误):[HTTPStatusEvent type=“httpStatus”气泡=假可取消=假事件阶段=2状态=0重定向=真响应URL=null]
安全性错误:
[SecurityErrorEvent type=“securityError”bubbles=false cancelable=false eventPhase=2 text=“Error#2048:安全沙盒冲突:http://无法从中加载数据https://www.youtube.com/v/?version=3&autoplay=1."]
所以我认为这是一个倒退

我认为这可能是一个HTTP到HTTPS的问题,但另一方面,直接加载YouTube Chromeless AS3播放器API(没有播放/停止和时间线控件),效果很好:

https://www.youtube.com/apiplayer?version=3&video_id=<my video code>
https://www.youtube.com/apiplayer?version=3&video_id=

如果有任何有用的提示,我们将不胜感激。

由于您试图从Adobe Security不喜欢的计算机上的本地文件访问web/server文件,因此出现了安全沙箱冲突错误。看看这个

还发现,当沙箱被配置为以一种方式使用,但由于错误而以另一种方式使用时,可能会发生这种情况

查看以下相关链接:


由于您试图从计算机上Adobe Security不喜欢的本地文件访问web/server文件,因此出现了安全沙箱冲突错误。看看这个

还发现,当沙箱被配置为以一种方式使用,但由于错误而以另一种方式使用时,可能会发生这种情况

查看以下相关链接:


    • 我遇到了同样的问题。Youtube现在似乎有一个更严格的crossdomain.xml()版本:

      
      
      然而它应该是

      <allow-access-from domain="*" />
      

      我遇到了同样的问题。Youtube现在似乎有一个更严格的crossdomain.xml()版本:

      
      
      然而它应该是

      <allow-access-from domain="*" />
      
      
      
      请仔细检查您的答案。引用提问者的开场白“我们有一个浏览器Flash应用程序…”。请仔细检查您的答案。引用询问者的开场白“我们有一个浏览器Flash应用程序…”。你在测试什么浏览器?我知道,从几个月前开始,Firefox就开始期望所有加载外部数据的Flash应用程序都能从HTTPS服务器上运行。其他浏览器也有可能效仿。最简单且经得起未来考验的解决方案是将服务器更新为HTTPS。您的主机或站点的控制面板可能已经允许简单的“启用HTTPS”设置。顺便问一句:不知道为什么无铬版能够通过(不要依赖于持久性)。然而,既然它能工作,你能不能不花一两天的时间制作自己的自定义播放/暂停/搜索控件?你找到了解决方案吗?我的flash应用程序也有同样的问题。您正在测试什么浏览器?我知道,从几个月前开始,Firefox就开始期望所有加载外部数据的Flash应用程序都能从HTTPS服务器上运行。其他浏览器也有可能效仿。最简单且经得起未来考验的解决方案是将服务器更新为HTTPS。您的主机或站点的控制面板可能已经允许简单的“启用HTTPS”设置。顺便问一句:不知道为什么无铬版能够通过(不要依赖于持久性)。然而,既然它能工作,你能不能不花一两天的时间制作自己的自定义播放/暂停/搜索控件?你找到了解决方案吗?我的flash应用程序也有同样的问题。
      https://www.youtube.com/apiplayer?version=3&video_id=<my video code>
      
      <allow-access-from domain="*.youtube.com" />
      <allow-access-from domain="s.ytimg.com" />
      
      <allow-access-from domain="*" />