如何在 Flex Builder 3 中捕获流视频显示并将其保存到磁盘?
我一段时间以来一直在寻找问题的解决方案,但没有得到答案。 我有一个带有 VideoDisplay 对象和“截取屏幕截图”按钮的页面。我想从流视频中获取屏幕截图并保存它,但出现错误:
安全沙箱违规:BitmapData.draw:http://xxx/xxx.swf 无法访问 rtmp:/ /xxx/xx/xx/.没有授予访问权限的策略文件。
我从中捕获图像的网站的域和 rtmp 是相同的。
我正在使用 ImageSnapshot 类来捕获屏幕截图。这是负责截取屏幕截图的函数:
function takeSnapshot()
{
var imageSnap:ImageSnapshot=ImageSnapshot.captureImage(mainPlayer);
var imageByteArray:ByteArray=imageSnap.data as ByteArray;
var fileRef:FileReference=new FileReference();
fileRef.save(imageByteArray, "screenshot.png");
}
我还有一个带有 lin: 的跨域策略文件:
<allow-access-from domain="*" />
我将感谢您的帮助。
I've been looking for a solution to my problem for a while and didn't get the answer.
I have a page with a VideoDisplay object and a "Take screenshot" button. I would like to get the screenshot from the streaming video and save it but I'm getting an error:
Security sandbox violation: BitmapData.draw: http://xxx/xxx.swf cannot access rtmp://xxx/xx/xx/. No policy files granted access.
The domain of the website from which I'm capturing the image and the rtmp is the same.
I'm using ImageSnapshot class to capture the screenshot. This is the function responsible for taking the screenshot:
function takeSnapshot()
{
var imageSnap:ImageSnapshot=ImageSnapshot.captureImage(mainPlayer);
var imageByteArray:ByteArray=imageSnap.data as ByteArray;
var fileRef:FileReference=new FileReference();
fileRef.save(imageByteArray, "screenshot.png");
}
I've got also a cross-domain policy file with a lin:
<allow-access-from domain="*" />
I'd be grateful for your help.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
看来有人已经弄清楚了。
他遇到了无法正确连接到流的问题
看看
It seems someone has figured it out.
He was having an issue with not connecting to the stream correctly
Have a look