How to capture a streaming video display and save it to disk in Flex Builder 3?

耗尽温柔 提交于 2019-12-11 23:48:34

问题


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.


回答1:


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




回答2:


Flash Player cannot access bitmap data or sound spectrum data for media loaded from RTMP sources, although it can display and play bitmaps and sounds loaded from these servers.



来源:https://stackoverflow.com/questions/6017259/how-to-capture-a-streaming-video-display-and-save-it-to-disk-in-flex-builder-3

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!