Video length problem


im having small problem, trying build video controls in application, creating playhead using hslider.

my video defined
=====
<mx:videodisplay autoplay="false" id="video" live="false" >
<mx:source>...source....</mx:source>
<mx:volume>.75</mx:volume>
<mx:playheadupdateinterval >25</mx:playheadupdateinterval>
</mx:videodisplay>
====


and slider
====
<mx:hslider maximum="{video.totaltime}" enabled="true" change="setvideo(event)" id="playhead" allowtrackclick="true" value="{video.playheadtime}" >
====

the function used
=====

private function setvideo(event:sliderevent):void {
var currentslider:slider=slider(event.currenttarget);
video.playheadtime=currentslider.value;
}
=====
the problem totaltime loads immediately, waits video play through. causes slider max nan, removing functionality.

is there better method creating playhead? files flvs on http, not live.
thanks help



More discussions in Flex (Read Only)


adobe

Comments

Popular posts from this blog

Connecting Raspberry Pi 2 to P10(1R)-V706 LED Dot Matrix - Raspberry Pi Forums

TypeError: <unknown> is not a numpy array - Raspberry Pi Forums

datso and removing imagetitle - Joomla! Forum - community, help and support