@beck24/youtube-video

Lazy loaded youtube embed

Usage no npm install needed!

<script type="module">
  import beck24YoutubeVideo from 'https://cdn.skypack.dev/@beck24/youtube-video';
</script>

README

Built With Stencil

youtube-video

A web component for displaying youtube videos in a lazy-loaded manner. Displays and loads only the video thumbnail until the user clicks, then it loads the player and auto-plays.

By default it takes the size of its container, but an explicity width/height can be passed as props.

See the demo: https://beck24.github.io/youtube-video-component/

See the component properties/css variables: https://github.com/beck24/youtube-video-component/blob/master/src/components/youtube-video/readme.md