开发者

How to take a snapshot of video control?

开发者 https://www.devze.com 2023-02-08 06:08 出处:网络
I have an mx:Video object that plays live streaming vid开发者_如何转开发eo. How can I take a snapshot of that video?Suppose your VideoDisplay object is called \"v\":

I have an mx:Video object that plays live streaming vid开发者_如何转开发eo. How can I take a snapshot of that video?


Suppose your VideoDisplay object is called "v":

<mx:VideoDisplay id="v" source="..." ... />

Then you can draw the contents onto a Bitmap object like so:

var bd:BitmapData = new BitmapData(v.width, v.height);
bd.draw(v);

var b:Bitmap = new Bitmap(bd);

Now the Bitmap object has a snapshot of the video.

0

精彩评论

暂无评论...
验证码 换一张
取 消