I am trying to use Bitmap.draw on a streaming FLV. My streaming host is limelight and they said they have this already added to their application.xml
<AudioSampleAccess enabled="true">/</AudioSampleAccess>
<VideoSampleAccess enabled="true">/</VideoSampleAccess>
The error I am receiving is this:
SecurityError: Error #2135: Security sandbox violation: BitmapData.draw: file:///D|/POST/VTOD/09.%20Interactions/Untitled%2D1.swf cannot access rtmp://myserver.net/blah/blah. RTMP content cannot be accessed using this API.
at flash.display::BitmapData/draw()
at Untitled_fla::MainTimeline/takeSnapshot()
What am I doing wrong…here is my code:
import fl.video.*;
var server :String = "rtmp://myserver.net/lp_titles/";
var telecourse :String = "human_trafficking/";
var lowStream :String = server + telecourse + "human_traff_lo.flv";
var highStream :String = server + telecourse + "human_traff_hi.flv";
vidPlayer.source = lowStream;
snap.addEventListener(MouseEvent.CLICK, takeSnapshot);
function takeSnapshot(e:MouseEvent):void
{
var myBitmapData:BitmapData = new BitmapData(vidPlayer.width, vidPlayer.height);
var img = myBitmapData.draw(vidPlayer);
var bmp:Bitmap = new Bitmap(myBitmapData);
addChild(bmp);
}