raunasur
raunasur

Reputation: 148

Does html5 <video> tag downloads all of the video at once from the server?

1 -If I add one video with <video> tag at the top of my page but autoplay is turned off, will it affect page load time by loading all of the video first? 2- If a user wishes to see the video(of say, 20 min) from where he has left(say, 10 min), will the whole video be downloaded?

Thanks.

Upvotes: 1

Views: 2441

Answers (1)

Doug Sillars
Doug Sillars

Reputation: 1765

videos are typically not completely downloaded. You can control this with the preload attribute.

  • preload= "metadata" - is the default which is 2-3% of the video.

  • preload="none" - no video will be downloaded on page load

  • preload="auto" - the entire video is downloaded. (Some browsers do not do this, and only download partial videos anyway)

If you zoom ahead from 10 min to watch 10-20min, with a mp4, you probably will download 0-10. Video streaming (like HLS or DASH) can skip ahead and not download 0-10.

Upvotes: 4

Related Questions