在这样的正常屏幕截图中: bitmapData.draw(video,new Matrix()); 但是如何在osmf播放器中获取视频对象?我尝试在一个空白图像中绘制mediaPlayerSprite结果
var pictureData:BitmapData = new BitmapData(width, height);
var x:DisplayObjectTrait = _mediaPlayer.media.getTrait(org.osmf.traits.MediaTraitType.DISPLAY_OBJECT) as DisplayObjectTrait;
var y:Video = x.displayObject as Video;
pictureData.draw(m_container, new Matrix());
var byteArray:ByteArray = new JPEGEncoder(80).encode(pictureData);
var file:FileReference = new FileReference();
file.save(byteArray, "pic.jpeg");
答案 0 :(得分:0)
从视频中获取Bitmapdata:
var videoDisplay:VideoDisplay = video.videoDisplay;
var videoObject:Video = videoDisplay.videoObject;
var bitmapData:BitmapData = new BitmapData(videoObject.videoWidth, videoObject.videoHeight, true, 0x000000);