Server-Side Communication ActionScript > Stream.length |
![]() ![]() ![]() |
Stream.length
Availability
Flash Communication Server MX.
Usage
Stream.length(name
)
Parameters
name
Name of a recorded stream (FLV) file or MP3 file. To get the length of an MP3 file, precede the name of the file with mp3:
(for example, "mp3:beethoven"
).
Returns
The length of a recorded stream file or MP3 file in seconds.
Description
Method (static); returns the length of a recorded stream file or MP3 file in seconds. If the requested file is not found, the return value is 0.
Example
This example gets the length of the recorded stream file myVideo
and assigns it to the variable streamLen
:
function onProcessCmd(cmd){ var streamLen = Stream.length("myVideo"); trace("Length: " + streamLen + "\n"); }
This example gets the length of the MP3 file beethoven.mp3
and assigns it to the variable streamLen
:
function onProcessCmd(cmd){ var streamLen = Stream.length("mp3:beethoven"); trace("Length: " + streamLen + "\n"); }
![]() ![]() ![]() |