contact@nexoscreator.tech

Lazy YouTube Player

Embed YouTube videos with lazy loading for faster page loads and improved performance.

Published on: 16/11/2024

Web DemoGitHub RepoYouTube VideoYouTube Video

Project Overview 🔍

Lazy YouTube Player is a lightweight, customizable YouTube player. It provides a simple way to embed YouTube videos with lazy loading capabilities, improving your website’s performance.

Features ✨

Installation 📦

<script
  type="module"
  src="https://cdn.jsdelivr.net/npm/lazy-youtube-player@v0.3.0/yt-player.min.js"
  defer
></script>

<link
  rel="stylesheet"
  href="https://cdn.jsdelivr.net/npm/lazy-youtube-player@v0.3.0/yt-player.min.css"
/>

Usage 🚀

Here’s a basic example of how to use the Lazy YouTube Player in a website:

<div class="NexosYt" data-embed="YT_VIDEO_ID"></div>

optional: data-thumbnail="CUSTOM_THUMBNAIL_URL"

API

The LazyYouTubePlayer component accepts the following props:


Created with ❤️ by @nexoscreator

⭐ Star us on GitHub!