使用你自己的AMS,你怎么能在一个RTMP流使用的BitmapData.draw(),没有安全异常?自己的、你怎么、能在、异常

2023-09-08 14:15:20 作者:一路小跑跑进你心里

我已经张贴了关于在更一般的情况下,类似的问题,但这个问题专门处理RTMP。

I've posted a similar question about the more general case, but this question deals specifically with RTMP.

我们有一个Adobe AIR应用程序写在AS3中,可以从其他方观看实时视频流。话虽这么说,想打电话的时候的BitmapData.draw()对这些远程视频流中的一个(在技术上我们称之为 ImageSnapshot.captureImage() ),我们得到一个2123的错误 - 一个安全沙箱中的例外。我见过很多人是指在AMS真正简单的配置,使这项工作对RTMP流,但他们一直张贴断开的链接,链接到职位,只隐约提及此配置等。有一件事我没有发现的东西,我在申请的麻烦:

We have an Adobe AIR app written in AS3 that can view live video streams from other parties. That being said, when trying to call BitmapData.draw() on one of those remote video streams (technically we're calling ImageSnapshot.captureImage()), we're getting a 2123 error - a security sandbox exception. I've seen a lot of people refer to a real simple configuration in the AMS that will allow this to work for RTMP streams, but they keep posting broken links, links to posts that only vaguely mention this configuration, etc. The one thing I did find is something that I'm having trouble applying:

http://help.adobe.com/en_US/FlashMediaServer/3.5_SS_ASD/WS5b3ccc516d4fbf351e63e3d11a11afc95e-7ec3.html#WS5b3ccc516d4fbf351e63e3d11a11afc95e-7fcb

为了使上述工作,我已经尝试设置 audioSampleAccess videoSampleAccess /,但无济于事。在AMS,Application.xml中,我设置了以下配置:

To make the above work, I've tried setting audioSampleAccess and videoSampleAccess both to "/", but to no avail. On the AMS, in Application.xml, I've set these configurations:

<FolderAccess>true</FolderAccess>
<AudioSampleAccess enabled="true">*</AudioSampleAccess>
<VideoSampleAccess enabled="true">*</VideoSampleAccess>

我也看到引用建立一个开放的跨域策略文件,但我见过的人强调,这是没有必要的,我没有看到任何明确提及的服务器上的政策文件需要。我有,不过,开始制定 NetStream.checkPolicyFile ,我已经放在一个跨域策略文件网站本身的根目录(相对于AMS)的。

I've also seen references to setting up a wide-open cross-domain policy file, but I've seen people emphasize that it's not necessary, and I don't see any clear mention of where on the server that policy file needs to be. I have, however, started setting NetStream.checkPolicyFile to true, and I have placed a cross-domain policy file in the root directory of the website itself (as opposed to the AMS).

请不要只给我一个链接,除非它是一个快速的,明确的解释。你如何配置AMS让人们捕获RTMP视频流的截图?对于上述文章中,我已经尝试设置videoStreamAccess和audioStreamAccess既为/,甚至没有奏效。我们还需要能够做到这一点的P2P RTMFP流,但是这的确是一个不同的问题。谢谢你。

Please don't just give me another link, unless it's to a quick, clear explanation. How do you configure the AMS to allow people to capture screenshots from RTMP video streams? For the above article, I've tried setting videoStreamAccess and audioStreamAccess both to "/", and even it didn't work. We also need to be able to do this for P2P RTMFP streams, but that's really a different question. Thanks.

推荐答案

我有以下FMS code,以修复的application.onConnect方法错误:

I have following FMS code to fix that error in application.onConnect method:

client.videoSampleAccess = "/";
client.audioSampleAccess = "/";
 
精彩推荐