<div class="videoBackground">
<video preload="auto" playsinline autoplay loop muted>
<source src="https://dl.dropboxusercontent.com/s/svb6t3bxnwsqvx3/Sweet_Home_mini.mp4?dl=0" type="video/mp4">
</video>
</div>
<script>
$(document).ready(function() {
var width = $(window).width();
var height = $(window).height();
$(".videoBackground")
.width(width)
.height(height);
});
$(window).resize(t_throttle(function() {
var width = $(window).width();
var height = $(window).height();
$(".videoBackground")
.width(width)
.height(height);
}));
</script>
<style>
.videoBackground > video {
object-fit: cover;
background-size: cover;
width: 100%;
height: 100%
}
</style>