Skip to main content
Inspiring
Nov 7, 2012 8:19 PM UTC
Answered

BufferTimeMax with Live Streams

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 is closed to new replies. Start a new post to keep the conversation going.
    twelfth312Correct answer
    Inspiring
    Feb 23, 2013 5:17 PM UTC

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

    4 replies

    twelfth312Correct answer
    Inspiring
    Feb 23, 2013 5:17 PM UTC

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

    Translate
    gmcgee77Author
    Inspiring
    Feb 25, 2013 6:56 PM UTC

    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?

    Translate
    Nov 8, 2012 5:26 AM UTC

    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

    Translate
    gmcgee77Author
    Inspiring
    Nov 8, 2012 2:13 PM UTC

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

    Translate