rss
twitter

Thursday, June 03, 2010

Displaying Video length in Display

We all know that using VideoDisplay in flex we can play FLV videos in flex. its good to show the duration of the video in screen when the video are loading . for that we can use one attribute in VideoDisplay component called "totalTime".
It will return the how long the video will play to the user before it actually bufferd it.its good to know the time before it loads.

This can be accessed by

videoObjId.totalTime


Here is the example that display the total time of the video in application.

<?xml version="1.0" encoding="utf-8"?>

<mx:Application name="VideoDisplay"
xmlns:mx="http://www.adobe.com/2006/mxml"
>

<mx:ApplicationControlBar dock="true">
<mx:Form >
<mx:FormItem label="Video Time:">
<mx:Label text="{videoDisplay.totalTime}" />
</mx:FormItem>
</mx:Form>
</mx:ApplicationControlBar>

<mx:VideoDisplay id="videoDisplay"
source="flextest.flv"
autoPlay="false"
click="videoDisplay.play();" />

</mx:Application>

Bookmark and Share

0 comments:

Post a Comment

  © Blogger templates by Ourblogtemplates.com updated with zenplate.com tips

Back to TOP