
ADOBE FLASH MEDIA INTERACTIVE SERVER
Server-Side ActionScript Language Reference
97
A stream is a one-way connection between a client running Flash Player and a server running Flash Media Server,
or between two servers running Flash Media Server. You can create a stream in Server-Side ActionScript by calling
Stream.get(). A client can access multiple streams at the same time, and there can be hundreds or thousands of
Stream objects active at the same time.
Streams can contain ActionScript data. Call the
Stream.send() method to add data to a stream. You can extract
this data without waiting for a stream to play in real time, such as when you’re creating a log file. You can also use it
to add metadata to a stream.
Availability
Flash Communication Server 1
Property summary
Method summary
Event handler summary
Stream.bufferTime
myStream.bufferTime
Property (read-only) Description
Stream.bufferTime Read-only; indicates how long to buffer messages before a stream is played, in seconds.
Stream.name Read-only; contains a unique string associated with a live stream.
Stream.syncWrite A boolean value that controls when a stream writes the contents of the buffer to a file when
the stream is recording.
Method Description
Stream.clear() Deletes a recorded FLV file from the server.
Stream.flush() Flushes a stream.
Stream.get() Static; returns a reference to a Stream object.
Stream.getOnMetaData() Returns an object containing the metadata for the named stream or video file.
Stream.length() Static; returns the length of a recorded stream in seconds.
Stream.play() Controls the data source of a stream with an optional start time, duration, and reset flag to
flush any previously playing stream.
Stream.record() Records all the data passing through a Stream object and creates an FLV file of the recorded
stream.
Stream.send() Invokes a remote method on a client-side NetStream object subscribing to the stream and
passes it parameters of any ActionScript data type.
Stream.setBufferTime() Sets the length of the message queue.
Stream.setVirtualPath() Sets the virtual directory path for video stream playback.
Stream.size() Static; returns the size of a recorded stream in bytes.
Event handler Description
Stream.onStatus() Invoked every time the status of a Stream object changes.
Commenti su questo manuale