Macromedia flash media server 2-client-side actionscript language reference for flash media server 2 User Manual
NetStream class
109
NetStream.setBufferTime()
Availability
■
Flash Player 6.
■
Flash Communication Server MX 1.0.
Usage
public setBufferTime(bufferTime : Number) : Void
Parameters
bufferTime
The number of seconds to be buffered before Flash stops sending data (on a
publishing stream) or begins displaying data (on a subscribing stream). The default value is 9.
Description
Method; behavior depends on whether this method is called on a publishing or a
subscribing stream.
subscribing stream.
■
For a publishing stream, this method specifies how long the outgoing buffer can grow
before Flash starts dropping frames. On a high-speed connection, buffer time shouldn’t be
a concern; data will be sent almost as quickly as Flash can buffer it. On a slow connection,
however, there might be a significant difference between how fast Flash buffers the data
and how fast it can be sent to the client.
before Flash starts dropping frames. On a high-speed connection, buffer time shouldn’t be
a concern; data will be sent almost as quickly as Flash can buffer it. On a slow connection,
however, there might be a significant difference between how fast Flash buffers the data
and how fast it can be sent to the client.
For example, suppose you set
bufferTime
to 30, but after 30 seconds, only 5 seconds of
data have been sent over the connection. Flash may stop sending data to the buffer until
more data has been sent to the client. The client will receive the initial 30 seconds that
were buffered but might lose some intervening frames before the next set of buffered data
is displayed.
more data has been sent to the client. The client will receive the initial 30 seconds that
were buffered but might lose some intervening frames before the next set of buffered data
is displayed.
■
For a subscribing stream, this method specifies how long to buffer incoming data before
starting to display the stream. For example, if you want to make sure that the first 15
seconds of the stream play without interruption, set
starting to display the stream. For example, if you want to make sure that the first 15
seconds of the stream play without interruption, set
bufferTime
to 15; Flash will begin
playing the stream only after 15 seconds of data have been buffered.
When a recorded stream is played, if
bufferTime
is zero, Flash sets it to a small value
(approximately 10 milliseconds). If live streams are later played (for example, from a
playlist), this buffer time persists—that is,
playlist), this buffer time persists—that is,
bufferTime
remains nonzero for the stream.
See also
NO
TE
The default value for Flash Media Server
bufferTime
parameter is different than the
default value for the standard ActionScript
bufferTime
parameter.