
Company News
Socket Named Top Sales Organization by RepVue
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.
react-youtube-player
Advanced tools
React component that encapsulates YouTube IFrame Player API and exposes player controls using the component properties.
React component that encapsulates YouTube IFrame Player API and exposes player controls using the component properties.
componentDidMount callback is used to replace the rendered element with an iframe that loads a YouTube Player.
componentWillReceiveProps is used to detect when component properties change, compare them with the state of the YouTube Player and call YouTube IFrame Player API when necessary.
import YoutubePlayer from 'react-youtube-player';
/**
* @typedef {string} YoutubePlayer~playbackState
* @value 'unstarted' Stops and cancels loading of the current video. [stopVideo]{@link https://developers.google.com/youtube/iframe_api_reference#stopVideo}
* @value 'playing' Plays the currently cued/loaded video. [playVideo]{@link https://developers.google.com/youtube/iframe_api_reference#playVideo}
* @value 'paused' Pauses the currently playing video. [pauseVideo]{@link https://developers.google.com/youtube/iframe_api_reference#pauseVideo}
*/
/**
* @property {string} videoId
* @property {string|number} width (default: '100%').
* @property {string|number} height (default: '100%').
* @property {YoutubePlayer~playbackState} playbackState
* @property {Object} configuration Configuration parameters to be passed to the YouTube Player (known as `playerVars` in the YouTube Player API for iframe Embeds, https://developers.google.com/youtube/player_parameters?playerVersion=HTML5#Parameters).
*/
<YoutubePlayer
videoId=''
playbackState='unstarted'
configuration={
{
showinfo: 0,
controls: 0
}
}
/>
To run the demo:
npm install
npm run build
npm run demo
FAQs
React component that encapsulates YouTube IFrame Player API and exposes player controls using the component properties.
The npm package react-youtube-player receives a total of 141 weekly downloads. As such, react-youtube-player popularity was classified as not popular.
We found that react-youtube-player demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

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.

Company News
Socket won two 2026 Reppy Awards from RepVue, ranking in the top 5% of all sales orgs. AE Alexandra Lister shares what it's like to grow a sales career here.

Security News
NIST will stop enriching most CVEs under a new risk-based model, narrowing the NVD's scope as vulnerability submissions continue to surge.

Company News
/Security News
Socket is an initial recipient of OpenAI's Cybersecurity Grant Program, which commits $10M in API credits to defenders securing open source software.