JSFiddle - React, Tailwind, and code Playground
HTML
<div class="container">Some random text BEFORE the video</div>
<div class="container">
<div class="video">
<div class="video-preloader">
<span>Loading .. Loading .. Loading</span>
</div>
<iframe width="560" height="315" src="https://www.youtube.com/embed/ig3qHRVZRvM" frameborder="0" class="inv"></iframe>
</div>
</div>
<div class="container">Some random text AFTER the video</div>
CSS
.container {
width: 100%;
float: left;
}
.video {
max-width: 560px;
max-height: 315px;
margin:0 auto;
position:relative;
}
.video-preloader{
position: absolute;
text-align:center;
top: 0;
left: 0;
bottom: 0;
right: 0;
z-index: -1;
overflow: hidden;
}
.video-preloader > span {
-webkit-transform: translateY(-50%);
-moz-transform: translateY(-50%);
transform: translateY(-50%);
position: absolute;
width:100%;
top: 50%;
left: 0;
}
.inv {
opacity: 0.1;
}