flex3flexbuilderscreenshotvideodisplay

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


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.


Solution

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