You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

react-youtube-background

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

react-youtube-background

A library for playing Youtube videos in the background


Version published
Weekly downloads
201
decreased by-48.98%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

react-youtube-background

A React component that uses a Youtube video as background for a container.

Installation

$ npm install react-youtube-background

Usage

Import the component

import YoutubeBackground from 'react-youtube-background'

Use the component in you render function

<YoutubeBackground
  videoId={string}                /* default -> null */
  aspectRatio={string}            /* default -> "16:9" */
  overlay={string}                /* default -> null | e.g. "rgba(0,0,0,.4)" */
  className={string}              /* default -> null */
  nocookie={bool}                 /* default -> false | sets host to https:/*www.youtube-nocookie.com to avoid loading Google's cookies */
  playerOptions={object}          /* default -> {}  | https://developers.google.com/youtube/player_parameters*/
  onReady={func}                  /* default -> null | returns event with player object */
  onEnd={func}                    /* default -> null | returns event with player object */
  onPlay={func}                   /* default -> null | returns event with player object */
  onPause={func}                  /* default -> null | returns event with player object */
  onError={func}                  /* default -> null | returns event with player object */
  onStateChange={func}            /* default -> null | returns event with player object */
  onPlaybackRateChange={func}     /* default -> null | returns event with player object */
  onPlaybackQualityChange={func}  /* default -> null | returns event with player object */

>
  {/* YOUR CONTENT */}
</YoutubeBackground>

Keywords

FAQs

Package last updated on 30 Mar 2020

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc