I wanted to know if there was a way to get the "video" display object inside a VideoElement?
Suppose you want to take a "snapshot" with a Bitmap / BitmapData instance of a VideoElement, how could you do to get a reference to the display object displaying the video inside the video element
Thanks for your help
You can get to a VideoElement's Video instance by getting the displayObject property from it DisplayObjectTrait, and then cast it:
var video:VideoElement = ...
var viewable:DisplayObjectTrait = video.getTrait(MediaTraitType.DISPLAY) as DisplayObjectTrait;
if (viewable) // the element might still be loading ...
var video:Video = viewable.displayObject as Video;
Exactly what I needed to know, though I first get a NetStreamDisplayObjectTrait
var trait:NetStreamDisplayObjectTrait = _videoElement.getTrait(MediaTraitType.DISPLAY_OBJECT) as NetStreamDisplayObjectTrait; ... var video:Video = trait.displayObject as Video;
Thanks again for the solution