Copy link to clipboard
Copied
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?
Are you setting videoNS.bufferTime = 0 in your code earlier? If you do that, the bufferTimeMax is ignored.
Copy link to clipboard
Copied
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
Copy link to clipboard
Copied
No, I'm publishing a regular SWF. I'm working on a Windows machine.
Copy link to clipboard
Copied
Are you setting videoNS.bufferTime = 0 in your code earlier? If you do that, the bufferTimeMax is ignored.
Copy link to clipboard
Copied
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?