开发者

FLEX, VideoDisplay: how to autoload without autorunning

开发者 https://www.devze.com 2022-12-27 12:38 出处:网络
I\'m using videoDisplay MXML component for my Flex app. I would like to autoload videos (in order to display the first frame) without automatical开发者_如何学运维ly run them.

I'm using videoDisplay MXML component for my Flex app.

I would like to autoload videos (in order to display the first frame) without automatical开发者_如何学运维ly run them.

What's the easiest way to do it ?

thanks


player.addEventListener(VideoEvent.READY, readyHandler);
player.source = test.mp4;
player.load(); // if autoPlay is false

private function readyHandler(event:VideoEvent):void
{
   player.playheadTime = 0; //  triggers a seek to first frame
}


There are 2 options:

a)FLV movie - set autoPlay="false" in VideoDisplay

b)Live stream - call player.play();player.stop() in this order

0

精彩评论

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