I mean youtube or any other streaming video site, but I've seen it on Youtube.
There are times that the loaded bar shows that more than enough video stream has been loaded so the player could play it but it suddenly pauses and shows the loading icon?
I'm just curious. But it is a programming related question, as it could help me to better understand streamed flash video.
views:
124answers:
2AFAIK, streaming video is not loaded sequentially, although the protocol tries it. It is possible that a part is not yet completely downloaded, while on average, most of the video is. Halting the moving download bar would give the feeling that nothing happens.
Another possibility, but I don't know the protocol well enough to be certain, is that a particular package wasn't received completely, but the application thinks it did. Upon trying to execute that part of the stream, the video halts while it loads the missing bits.
I always assumed it used some kind of algorithm testing the amount of buffered data against your current download speed to check if the video could be played in its entirety. If your download speed suddenly drops below a certain threshold, the player realizes that you will hit the end of buffered data before the end of the video and so it stops and loads more.
Maybe not.