Craig Lafferty
Craig Lafferty

Reputation: 791

Do html 5 videos buffer on page load or only when playing the video?

If I wanted to embed 20 videos on a page will they all start buffering on page load or will they wait until they are played/interacted with for the first time? If they buffer on load how could I circumvent this until I want to display the video? I don't want a user to be buffering 20 videos when they may only be watching one or even none at all.

Upvotes: 4

Views: 2430

Answers (1)

Peshal
Peshal

Reputation: 1518

You are looking at the preload attribute of HTML5 video tag. Here is the doc. Basically there are three options :

 auto - when browser should load the entire video when the page loads
 metadata - when browser should load only metadata when the page loads
 none - when browser should NOT load the video when the page loads

Upvotes: 2

Related Questions