Is there a way to incorporate a YouTube video as the background of a div, similar to how it is done on this site, using a <video>
tag and ensuring that the video "covers" the entire div without any empty spaces while maintaining its original ratio?
Although the preferred method for embedding a YouTube video in HTML5 is via an iframe:
<iframe width="420" height="315"
src="https://www.youtube.com/embed/tgbNymZ7vqY">
</iframe>
https://i.sstatic.net/tWfC0.png
I attempted to replicate this effect on this CodePen.