开发者

(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 ba开发者_C百科r 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.


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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜