Using NetStream to stream content from http, I noticed that esp with certain h264 exported, if a player encounters an empty buffer, it will stop and forget to the required length (as expected).
However, as soon as the buffer is full, playback does not resume, but instead jumps forward, as such, instantly reproducing the buffered duration for a short moment and, thus, again starting the empty buffer .. this will continue and more.
Presumably, when netstream pauses for buffering, the playlist position continues, and the player tries to get attached to this position when resuming, however, given that it may take 5 seconds to create a 2-second buffer, it ends up with a useless buffer again ..
(this is an assumption)
I tried to get around this by listening to the empty netstatus event of the buffer, pausing the stream and at the same time setting up a loop to check the current buffer length against the requested buffer length .. and resume after the buffer length is greater than or equal to the requested buffer. However, this causes problems when there is not enough video. For example, a 10-second buffer with the remaining 5 seconds, the loop just sits there, waiting for a buffer length of 10 seconds, when only 5 ...
You might think that you can simply check which one is smaller, the remaining time, or the requested buffer length. However, the flash response time is inaccurate.
If you add the current index of the current stream, plus buffering time, the total number will not last throughout the movie (if at the end) .. it is close, but not the same.
This brings me back to the original problem, and if there is another way to fix this, it is clear that the flash knows when the buffer is ready, so how can I get a flash pause when it is buffered and resume as soon as the buffer is ready? this is not happening at present .. it pauses and then, once the buffer is full, it plays all the buffer content after about .1 seconds.
Thanks in advance, Stephen.