如何捕获流视频显示并将其保存到Flex Builder 3中的磁盘上? [英] How to capture a streaming video display and save it to disk in Flex Builder 3?

查看:90
本文介绍了如何捕获流视频显示并将其保存到Flex Builder 3中的磁盘上?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

一段时间以来,我一直在寻找解决问题的方法,但没有得到答案. 我有一个带有 VideoDisplay 对象和获取屏幕截图"按钮的页面.我想从流视频中获取屏幕截图并保存,但出现错误:

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:

违反安全沙箱:BitmapData.draw: http://xxx/xxx.swf 无法访问rtmp://xxx/xx/xx/.没有策略文件被授予访问权限.

Security sandbox violation: BitmapData.draw: http://xxx/xxx.swf cannot access rtmp://xxx/xx/xx/. No policy files granted access.

我从中捕获图像的网站的域名与rtmp相同.

The domain of the website from which I'm capturing the image and the rtmp is the same.

我正在使用 ImageSnapshot 类来捕获屏幕截图.这是负责截取屏幕截图的功能:

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");
    }

我还有一个带有lin的跨域策略文件:

I've got also a cross-domain policy file with a lin:

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

感谢您的帮助.

推荐答案

似乎有人知道了.
他遇到了无法正确连接到流的问题

It seems someone has figured it out.
He was having an issue with not connecting to the stream correctly
Have a look

这篇关于如何捕获流视频显示并将其保存到Flex Builder 3中的磁盘上?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆