Hi,

I want to be able to get the duration of any flv file using the 
videoDisplay object. This works fine most of the time (just 
myVideoDisplay.totalTime)... However, for older flv files (before 
1.1) this metadata is not included.

Looking at the code in VideoDisplay.as:


        /**
         *  Total length of the media, in seconds.
         *  For FLV 1.0 video files, you manually set this property.
         *  For FLV 1.1 and later, the control calculates this value
         *  automatically.
         */
        public function get totalTime():Number
        {
                if (!isNaN(_totalTime))
                        // totalTime was set manually, return the 
                        // same value.
                        return _totalTime;
                else
                        return videoPlayer != null ? 
videoPlayer.totalTime : NaN;
        }

But because I'm loading in different flv's dynamically I can't set 
the totalTime manually, or more to the point I don't know what the 
totalTime is to set it. Does anyone have any ideas for how I could go 
about this? I've seen tools that will inject the metadata into the 
flv, but I don't want to directly manipulate the flv itself.

Thanks in advance
Bill

Reply via email to