JSFiddle - React, Tailwind, and code Playground
by Nick Hulea
HTML
<div class="videoWrapper">
<iframe width="100%" height="620" src="https://www.youtube.com/embed/5GJCqqGqu00?start=100&end=130&autoplay=1&mute=1&controls=0&loop=1&disablekb=1&playlist=-HSzx-zryEgM&modestbranding=1&showinfo=0&rel=0"
frameborder="0" allow="autoplay; encrypted-media" allowfullscreen="" data-rocket-lazyload="fitvidscompatible" data-lazy-src="https://www.youtube.com/embed/5GJCqqGqu00?start=100&end=130&autoplay=1&mute=1&controls=0&loop=1&disablekb=1&playlist=HSzx-zryEgM&modestbranding=1&showinfo=0&rel=0"
class="lazyloaded" data-was-processed="true"></iframe>
</div>
CSS
.videoWrapper {
width: 100%;
overflow: hidden;
height: 550px;
}
@media (min-width: 1500px) {
.videoWrapper {
margin-top: -135px;
}
}
@media (min-width: 1200px) {
.videoWrapper {
margin-top: -75px;
}
}
JavaScript
setTimeout(function() {
console.log(document.getElementById("iframe"))
}, 5000)
document.getElementById("iframe").onload = function(e) {
console.log('hello')
}