Exciting news!Announcing our $4.6M Series Seed. Learn more
Socket
LoveBlogFAQ
Install
Log in

react-lazy-youtube

Package Overview
Dependencies
5
Maintainers
1
Versions
5
Issues
File Explorer

Advanced tools

react-lazy-youtube

React Component to lazy load t+youtube videos by showing only the thumbnail of the video untill the person clicks on it as seen on https://awesometalks.party

    1.0.1latest

Version published
Maintainers
1
Yearly downloads
18,541
increased by86.74%

Weekly downloads

Readme

Source

react-lazy-youtube

React Component to lazy load t+youtube videos by showing only the thumbnail of the video untill the person clicks on it as seen on https://awesometalks.party

Demo: https://react-lazy-youtube.now.sh/

Props:

NameTypeDefaultDescription
idStringRequired
imageSizeenumdefaultSize of the thumbnail we get from youtube (default, hqdefault, mqdefault, sddefault, maxresdefault )
noCookiesboolfalseif set to true will change the host to "https://www.youtube-nocookie.com"
onEndfuncnoopFunctinn that runs on the end of the video
onErrorfuncnoopFunction that runs when the video encounters an error
onPausefuncnoopFunction that runs when the video is paused
onPlayfuncnoopfunction to run when the video starts Playing
onPlaybackQualityChangefuncnoopFunction that runs when the video changes quality
onPlaybackRateChangefuncnoopFunction that runs when the video encounters changes playback rate
onStateChangefuncnoopFunction that runs when the video changes state like from playing to paused
playerVarsobject{}https://developers.google.com/youtube/player_parameters
stylesobject{}Styles to apply over the wrapper

Contributing

Everyone is welcome to contribute.

Authors and license

Sara Vieira and contributors.

MIT License, see the included License.md file.

Socket

Product

Subscribe to our newsletter

Get open source security insights delivered straight into your inbox. Be the first to learn about new features and product updates.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc