This custom element visually renders just like the real thing but approximately 224X faster.
Normal <iframe> YouTube embed |
lite-youtube |
---|---|
<lite-youtube data-videoid="ogfYd705cRs"></lite-youtube>
Use this as your HTML, load the script asynchronously, and let the JS progressively enhance it.
<lite-youtube data-videoid="ogfYd705cRs" style="background-image: url('https://i.ytimg.com/vi/ogfYd705cRs/hqdefault.jpg');">
<div class="lty-playbtn"></div>
</lite-youtube>
More coming soon.