我正在尝试在视频对象上使用 BitmapData.draw(),但使用的是 OSMF 框架。
我的托管服务设置了以下内容,以便我可以访问我的 rtmp 视频:
<VideoSampleAccess enabled="true">/</VideoSampleAccess>
简化代码如下:
_videoURL = "my-url-here"
resource = new StreamingURLResource(_videoURL);
videoElement = new VideoElement(resource);
_player.media = videoElement;
container.addMediaElement(videoElement);
_player.autoPlay = true;
_player.play();
// later on, pause the player at the end
_player.pause();
// get the Video object
videoObj = _player.displayObject as Video;
// detach the netstream
videoObj.attachNetStream(null);
// get the bitmap from the Video object and draw on it..
bmpdata:BitmapData = new BitmapData(videoObj);
bmpdata.draw()
但是,我收到以下错误消息:
SecurityError: Error #2135: Security sandbox violation: BitmapData.draw: ...