My home page has a video as a background, but sometimes the video takes a long time to load. In this situation I thought about creating a loading
before the page was displayed, my question is how can I check with jquery/javascript
if a file (video) has already been loaded completely and then display the whole page.
The video is a local file
<video id="video" autoplay loop muted>
<source src="/public/video/capa_video.mp4" type="video/mp4">
</video>
In my page I'm using the plugin fullpage js
, so in my file .js
I already have the ready
of jquery
.
$(document).ready(function() { ... });
How can I display a load effect before the document loads (images, videos, fonts, etc.)?