youtube-lite-iframe
v1.0.3
Published
Simple web componet that renders the youtube iframe only when you click on the video thumbnail. This way it avoids the immediate loading of youtube resources, helping the performance of your website.
Downloads
249
Maintainers
Readme
Basic usage Astro
<head>
<script> import { liteYoutubeIframe } from 'youtube-lite-iframe/component';</script>
</head>
Use Id video or Src
---
import { YoutubeEmbed } from "youtube-lite-iframe";
---
<YoutubeEmbed
id="Jvd-d4"
title="Example"
></YoutubeEmbed>
Basic usage typescript
Import component and liteYoutube function
<head>
<script> import { liteYoutubeIframe } from 'youtube-lite-iframe/component';</script>
</head>
import { liteYoutube } from "youtube-lite-iframe";
liteYoutube({
id: "vs-5674"
title: "Example"
})