Flash Media Server Developer Documentation

Playing recorded streams

One of the most popular uses of Adobe Flash Media Server is to stream recorded audio and video files that are stored on the server to many clients.

To play a recorded stream, pass a URI to NetStream.play() to locate the recorded file, as in the following:

ns.play("bikes");

This line specifies the recorded stream named bikes.flv within the application to which you are connected with NetConnection.connect(). Briefly, the play() method takes four parameters, with this syntax:

public function play( name:Object [,start:Number [,len:Number [,reset:Object] ] ]):void 

name

The name of a recorded file.

start

The time from the start of the video at which to start play, in seconds.

len

The duration of the playback, in seconds.

reset

Whether to clear any previous play() calls from a playlist.

These parameters are described in detail in NetStream.play() in the ActionScript 3.0 Language and Components Reference.