Skip to main content
Participant
November 20, 2013
Question

Setting buffer time on rtmp stream

  • November 20, 2013
  • 1 reply
  • 1204 views

I have the following code:

var nc:NetConnection = new NetConnection();

nc.client = { onBWDone: function():void{} };

var ns:NetStream;

nc.connect("rtmpe://url/");

ns = new NetStream(nc);

ns.bufferTime = 5;

On ns.play(), I expecting a 5 second buffer to occur before the stream starts to play.  Is my expectation incorrect?

This topic has been closed for replies.

1 reply

sinious
Legend
November 20, 2013

That is correct, in subscribe mode on a stream:

For a subscribing stream, bufferTime specifies how long to buffer incoming data before starting to display the stream.

Not to be confused with needing to wait 5 seconds to actually see video in some circumstances. My 75mbit line will buffer 5 seconds nearly instantaneously. If the stream is live then the typical setting for this is 0 (which internally is 10ms).