0 Replies Latest reply on Jan 13, 2008 7:07 AM by mihksoft

    NetStream video total time

    mihksoft Level 1

      I try to make a video player using NetStream, NetConnection and Video all from flash.
      My problem is that I don't know how to get totalTime for a video, can anybody help me with that? I work with Flex 2.

      I use that for the initialization for NetStream, NetConnectionand Video:

      _netConnection = new NetConnection();
      _netConnection.connect (null);
      _netStream = new NetStream(_netConnection);
      _video = new Video();
      addChild (_video);
      _client = new Object();
      _netStream.client = _client;
      _client.onMetaData = onNetStreamMetaDataCallback;
      _video.attachNetStream (_netStream);

      This is for metadata, this suppose to give me the information about the video and totalTime, but I put a breakpoint here and never stop wit debug:

      private function onNetStreamMetaDataCallback (mdata:Object):void
      trace (mdata.duration);

      The path for video is a local path, a video file flv in my project: