Skip to main content
Inspiring
November 7, 2012
Answered

BufferTimeMax with Live Streams

  • November 7, 2012
  • 2 replies
  • 1834 views

I have a video-chat program that uses FMS and I'm trying to use the bufferTimeMax property on the subscribing NetStream, but it doesn't seem to work. When I manually throttle my download speed, the live stream from the other client just lags and becomes more and more backed up. When checking the bufferLength and liveDelay at this point, it does show values over 0 but it's not reflecting how backed up it really is, and no matter what I set the bufferTimeMax to, it always traces as being 0.

I'm publishing to Flash v. 10.3 using Flash CS6 pro. Publishing to v. 11.2 doesn't help.

Code sample:

videoNS.bufferTimeMax = 3;

trace(1, videoNS.bufferTimeMax);

videoNS.play(streamName, startParam);

videoNS.bufferTimeMax = 3;

trace(2, videoNS.bufferTimeMax);

This returns:

1 0

2 0

Any ideas?

    This topic has been closed for replies.
    Correct answer twelfth312

    Are you setting videoNS.bufferTime = 0 in your code earlier?  If you do that, the bufferTimeMax is ignored.

    2 replies

    twelfth312Correct answer
    Inspiring
    February 23, 2013

    Are you setting videoNS.bufferTime = 0 in your code earlier?  If you do that, the bufferTimeMax is ignored.

    gmcgee77Author
    Inspiring
    February 25, 2013

    I am. Netstream documentation says to set bufferTime = 0 for live streams. Why is this caveat not in the documentation?

    Many thanks for the explanation, twelfth312.

    It seems like I should prefer bufferTimeMax to take advantage of the live stream catch-up feature, whereas the bufferTime seems like backed-up data just gets lost. Does that make sense?

    November 8, 2012

    Are you trying to use on AIR 3.0 (and later) for iOS? If yes, then bufferTimeMax property is not supported. You can check following link for more details:

    http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/net/NetStream.html

    gmcgee77Author
    Inspiring
    November 8, 2012

    No, I'm publishing a regular SWF. I'm working on a Windows machine.