How does Youtube's HTML5 video player control buffering?

前端 未结 4 538
小鲜肉
小鲜肉 2021-01-29 20:49

I was watching a youtube video and I decided to investigate some parts of its video player. I noticed that unlike most HTML5 video I have seen, Youtube\'s video player does not

4条回答
  •  一个人的身影
    2021-01-29 21:10

    When you look at the AppData of GoogleChrome, while playing a youtube video, you will see that it buffers in segmented files. The videos uploaded to youtube are segmented, which is why you can't perfectly pinpoint a timeframe in the first click on the bar if that timeframe is outside of the current segment.

    The amount of segments depends on the length of the video, and the time from which you start and stop playing back the video.

    When you are linked to a timeframe of a video, it will simply skip the buffering of the segments that come before that timeframe.

    Unfortunately I don't know much about the coding for video playback, but I hope this points you in the right direction.

提交回复
热议问题