flashyoutubevideo-streamingflash-video

(curiosity) Why does youtube show the loading icon even when it has loaded enough video to start playing?


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.


Solution

  • AFAIK, 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.