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

Follow these steps to set up Lazy YouTube Player on your machine.

  1. Add the script to your HTML file:
<script type='module'
  src="https://cdn.jsdelivr.net/npm/lazy-youtube-player@v0.3.0/yt-player.min.js"
  defer
></script>
  1. Add the stylesheet to your HTML file:
<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>

πŸ’‘ You can also customize thumbnail data-thumbnail="CUSTOM_THUMBNAIL_URL", its optional.

🧠 API

The LazyYouTubePlayer component accepts the following props:

🀝 Contributing

We ❀️ contributions! Follow these steps to contribute:

  1. 🍴 Fork the repository
  2. 🌿 Create a new branch (git checkout -b feature/AmazingFeature)
  3. πŸ’Ύ Commit your changes (git commit -m 'Add some AmazingFeature')
  4. πŸš€ Push to the branch (git push origin feature/AmazingFeature)
  5. πŸ”ƒ Open a Pull Request

πŸ“– See our Contribution Guidelines for more details.

πŸ“„ License

This project is licensed under the MIT License. See the LICENSE file for details.

πŸ“¬ Contact & Community

πŸ’¬ Join us on Discord: Click Here
🐦 Follow on Twitter: @nexoscreator
πŸ“§ Email: contact@nexoscreator.tech

If you find this project helpful, please consider starring ⭐ the repository or sponsoring πŸ’– on GitHub!

Created with ❀️ by @nexoscreator