The server-side Stream class allows you to detect the length of a recorded stream. The Stream class has a static method, length(), that returns the length in seconds of an audio or video stream. The length is measured by Adobe Flash Media Server and differs from the duration that onMetaData returns, which is set by a user or a tool.
With Stream.length(), you must specify the name of a stream. It can be an actual stream name, in a URI relative to the application instance used in NetConnection.connect(), or a virtual stream name.
To use an actual stream name, for an application located in RootInstall/applications/dailyNews/ with the stream in the dailyNews/streams/_definst_ subdirectory, call Stream.length() like this:
length = Stream.length( "parade" ); // for an FLV file length = Stream.length( "mp3:parade.mp3" ); // for an MP3 file length = Stream.length( "mp4:parade.mp4" ); // for an MP4 file