Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to preload all videos in my website and other pages?

I'm make video websites in html5 with < video >

In my computer from disc website fadeIn and FadeOut very nice, but in my server i wait too long in every page because video starting preload.

Have you are got any idea how to sites

/Index.html
/Portfolio.html
/Contact.html

preloade when we go to Index.html? You know, we go to Index.html and we see procent preloader and in this time we loading /Index.html /Portfolio.html /Contact.html etc. When it's finish, all movies is loaded in cache browser and website it's working in realtime - click to contact.html and i see playing movie (not wait to preload video).

Any ideas how to make it? Thanks a lot, Arleta

like image 342
Arleta Koźmińska Avatar asked Dec 20 '13 09:12

Arleta Koźmińska


People also ask

How do you load an entire video when the webpage is loaded?

HTML | <video> preload Attribute auto: It is used to specify that the browser should load the entire video when the page loads. metadata: It is used to specify that the browser should load only metadata when the page loads.

What is video preload?

Definition and Usage. The preload attribute specifies if and how the author thinks that the video should be loaded when the page loads. The preload attribute allows the author to provide a hint to the browser about what he/she thinks will lead to the best user experience. This attribute may be ignored in some instances ...

What is preload Web?

Preload (spec) is a new web standard aimed at improving performance and providing more granular loading control to web developers. It gives developers the ability to define custom loading logic without suffering the performance penalty that script-based resource loaders incur.


2 Answers

You could combine the different html pages you have (demo-big-counter.html, demo-circular.html) into a single html page and separate the content into different tabs (You could use this for implementing tabs - http://getbootstrap.com/javascript/#tabs).

Add your videos to tabs that are hidden initially, they will start loading as soon as the main html file is opened.

like image 199
Jayant Jain Avatar answered Oct 26 '22 22:10

Jayant Jain


I would try something with JavaScript and set all the pages into one. You cannot preload something which is in another HTML file.

like image 27
Christian Agius Avatar answered Oct 27 '22 00:10

Christian Agius