2011-05-16 49 views
0

我一直在尋找一個解決我的問題了一會兒,並沒有得到答案。 我有一個的VideoDisplay對象和「拿截圖」按鈕的頁面。我想獲得從流式視頻截圖並保存它,但我得到一個錯誤:如何捕獲視頻流顯示並保存到磁盤中的Flex Builder 3?

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

我從中捕捉圖像的網站的域名和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"); 
    } 

我也得到了一個跨域策略文件用林:

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

我會是你的幫助表示感謝。

回答

1

看來有人已經想通了。
他在和未連接到正確的流
Have a look

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.

+0

你可以添加一個鏈接到您在哪裏找到語句中的問題? – 2011-05-25 23:02:25

+0

看來有人能夠得到快照。 http://stackoverflow.com/questions/1215127/how-do-i-specify-a-crossdomain-policy-file-to-allow-flash-to-grab-a-bitmap-from-a – 2011-05-25 23:05:16

+0

HTTP:// wwwimages.adobe.com/www.adobe.com/content/dam/Adobe/en/devnet/flashplayer/pdfs/flash_player_10_security.pdf 第50頁 – 2011-05-26 07:51:01