Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

react-youtube-lite

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-youtube-lite

<img s

  • 1.6.2
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
Maintainers
1
Weekly downloads
 
Created
Source

React YouTube Lite

NPM Version Monthly download on NPM CircleCI License: MIT Twitter: danestves

A responsive react component to render YouTube videos in a lazyload mode to get a high speed load website.

You can see a demo here

⏳ Installation

# npm
npm install react-youtube-lite

# yarn
yarn add react-youtube-lite

✏️ Usage

// index.tsx
import * as React from 'react';
import { ReactYouTubeLite } from 'react-youtube-lite';

const App = (): JSX.Element => {
  return <ReactYouTubeLite url="https://www.youtube.com/watch?v=DVQTGidS1yk" />;
};
// index.jsx
import React from 'react';
import { ReactYouTubeLite } from 'react-youtube-lite';

const App = () => {
  return <ReactYouTubeLite url="https://www.youtube.com/watch?v=DVQTGidS1yk" />;
};

🔗 Props

NameTypeDefaultDescriptionRe quired
adNetworkbooleantrueIf https://static.doubleclick.net is enabled or notNo
urlstringThe URL of the video in any format like youtube.com or youtu.be we take care of get the ID of the videoYes
playlistbooleanfalseIf the video URL contains a playlist or notNo
posterstringhqdefaultThe different quality to show the poster see: https://developers.google.com/youtube/v3/docs/thumbnails for more information. Available options: maxresdefault, 0, 1, 2, 3, default, hqdefault, mqdefault, sddefaultNo
titlestringReact YouTube LiteThe data-title to insert in the iframeNo
noCookiebooleanfalseIf you use GDPR and don't want YouTube cookies enable this optionNo
activatedClassstringlty-playbtThe class used to hide the elements when the iframe is already rendererNo
customThumbnailstringA custom thumbnail image url to show instead of the original youtube thumbnailNo
iframeClassstringembed-reponsive-itemDefault classes to put iframe responsiveNo
playerClassstringlty-playbtnClass for youtube play buttonNo
wrapperClassstringryt-lite embed-responsiveDefault classes to put container responsiveNo
aspectRatiostringaspect-ratio-16/9Implements a padding-bottom to generate the size of the iframe. Available options: aspect-ratio-none, aspect-ratio-square, aspect-ratio-16/9, aspect-ratio-4/3, aspect-ratio-21/9No

🤝 Contributing

Contributions, issues and feature requests are welcome!
Feel free to check issues page. You can also take a look at the contributing guide.

License

MIT License Copyright (c) 2020 Daniel Esteves.

FAQs

Package last updated on 22 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc