Make html 5 video buffer when loading a page or only when playing a video?

If I wanted to insert 20 videos on a page, will they all start buffering when the page loads, or will they wait for them to play / interact for the first time? If they load at boot, how can I get around this until I want to display the video? I do not want the user to buffer 20 videos when they can watch only one or even none.

+4
source share
1 answer

You are looking at the preloadHTML5 tag attribute video. Here is the doc . There are basically 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
+2
source

Source: https://habr.com/ru/post/1527027/


All Articles