About Buffering A Stream; About The Play Status Of A Stream - MACROMEDIA FLASH MEDIA SERVER 2-DEVELOPING MEDIA Develop Manual

Developing media applications
Table of Contents

Advertisement

Then, in the corresponding server-side ActionScript, you would add the following code in the
main.asc file:
application.onAppStart = function(){
trace("::: Application has started :::");
}
application.onConnect = function(client){
application.acceptConnection(client);
// Add methods
client.prototype.sendInfo = function(name) {
var slen = Stream.length(name);
trace("slen: " + slen);
return slen;
};
}

About buffering a stream

For playback streams, the value returned by the
how much of the stream Flash Media Server will buffer before Flash Player starts playing it
back. For example, if your recorded stream is 50 seconds long and your playback speed is
twice as fast as your download speed, you might consider setting this value to 25 seconds. You
will thus be able to play all of the stream without any stalls.
For publishing streams, this value specifies how long the outgoing queue can grow before
Flash Player considers dropping messages; to determine how much data is currently in the
queue, use
NetStream.bufferLength
NetStream.bufferLength
a slow connection it might.
Therefore, if you know your application is running over a slow connection and you want to
minimize dropped messages or stalled playback, you might want to use the
NetStream.setBufferTime()

About the play status of a stream

The
NetStream.onPlayStatus
completely played a stream. The information object that's passed to the callback function
gives extra information when a NetStream object has switched from one stream to another
stream in a playlist (
NetStream.Play.Switch
end (
NetStream.Play.Complete
create a function to process the information object sent by the server.
NetStream.bufferTime
. For a fast connection, the value returned by
will never approach the value of
method to increase the value of
event handler is invoked when a NetStream object has
) or when a NetStream object has played to the
). If you want to respond to this event handler, you must
property specifies
NetStream.bufferTime
NetStream.bufferTime
The NetStream class
, but on
.
51

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH MEDIA SERVER 2-DEVELOPING MEDIA and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash media server 2

Table of Contents