Via onMetaData you should be able to get duration. Have you tried
something like this?
private function playStream():void {
stream = new NetStream(nc);
stopTimer();
videoHolder = new UIComponent();
videoHolder.setActualSize(defaultWidth, defaultHeight);
video = new Video(defaultWidth, defaultHeight);
video.attachNetStream(stream);
stream.play(streamVideoURL);
stream.addEventListener(NetStatusEvent.NET_STATUS,
streamStatusHandler);
var client:Object = new Object();
client.onMetaData = onMetaData;
stream.client = client
}
public function onMetaData(info:Object):void {
duration = info.duration;
fRate = info.framerate;
totalBytes = info.bytesTotal;
metaWidth = info.width;
metaHeight = info.height;
}
john_69_11 said the following:
Is there an easy way to figure out the duration of an FLV thati s
being played? I have been looking at the NetStream object and the
onMetaData event, but it seems like the FLV does not always have the
metadata set. The FLVs I want to play are created my other people, so
there is no way to force them to add the metadata. is there any way
to easily get around this?
--
/Whether you think that you can, or that you can't, you are usually right./
- Henry Ford