0

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.

Natalia
  • 308
  • 1
  • 11

2 Answers2

1

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

Community
  • 1
  • 1
The_asMan
  • 6,364
  • 4
  • 23
  • 34
0

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.

Florian F
  • 8,822
  • 4
  • 37
  • 50
  • Can you add a link to where you found this statement? – The_asMan May 25 '11 at 23:02
  • It seems someone was able to get a snap shot. http://stackoverflow.com/questions/1215127/how-do-i-specify-a-crossdomain-policy-file-to-allow-flash-to-grab-a-bitmap-from-a – The_asMan May 25 '11 at 23:05
  • http://wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_10_security.pdf page 50 – Florian F May 26 '11 at 07:51
  • Interesting page 49 just as you quoted. I wonder how that guy got it working on the link I posted. – The_asMan May 26 '11 at 17:00