1

I have a Flash client that live-streams video over RTMP using NetStream. For some reason, Flash is ignoring the bufferTimeMax value, and under some circumstances bufferLength can grow to very large values. I cannot allow the buffer to grow to more than one second in size, so when it gets too large I need to flush the buffer. Right now the only method I have that works requires destroying the NetStream and NetConnection objects and reconnecting. The problem with this approach is that the app goes black while this happens, which is not acceptable.

I have tried the following approaches to flushing the buffer:

  1. Set bufferTime to zero, and then set it back to the desired value
  2. Seek to one second in the future
  3. close() the NetStream and then play() it again
  4. Create a new NetStream object while keeping the existing NetConnection

All of these methods fail for various reasons, usually by preventing video from playing at all.

user1084743
  • 67
  • 1
  • 6
  • I'm confused. You got an example of what a large value is? I mean "RT" is Real-Time so how could your broadcast server provide the buffer with 5-10 mins ahead of a live stream? Also can something be changed in your server settings to try fix this issue? – VC.One Apr 06 '16 at 20:11
  • I didn't say anything about 5-10 minutes... the largest I've seen is a 30 second buffer, but 5-10 seconds is more typical. This is an aberrant condition; most of the time the buffer is less than half a second, but if video stalls for some reason the buffer can grow significantly larger. – user1084743 Apr 07 '16 at 16:34

0 Answers0