0

在像这样的普通屏幕截图中: 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");
4

1 回答 1

0

要从视频中获取 Bitmapdata:

var videoDisplay:VideoDisplay = video.videoDisplay;
var videoObject:Video = videoDisplay.videoObject;
var bitmapData:BitmapData = new BitmapData(videoObject.videoWidth, videoObject.videoHeight, true, 0x000000);
于 2014-07-08T08:52:36.543 回答