
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
@gradeup/react-youtube
Advanced tools
Simple React component acting as a thin layer over the YouTube IFrame Player API
$ npm install react-youtube
<YouTube
videoId={string} // defaults -> null
id={string} // defaults -> null
className={string} // defaults -> null
containerClassName={string} // defaults -> ''
opts={obj} // defaults -> {}
onReady={func} // defaults -> noop
onPlay={func} // defaults -> noop
onPause={func} // defaults -> noop
onEnd={func} // defaults -> noop
onError={func} // defaults -> noop
onStateChange={func} // defaults -> noop
onPlaybackRateChange={func} // defaults -> noop
onPlaybackQualityChange={func} // defaults -> noop
/>
For convenience it is also possible to access the PlayerState constants through react-youtube:
YouTube.PlayerState
contains the values that are used by the YouTube IFrame Player API.
import React from 'react';
import YouTube from 'react-youtube';
class Example extends React.Component {
render() {
const opts = {
height: '390',
width: '640',
playerVars: { // https://developers.google.com/youtube/player_parameters
autoplay: 1
}
};
return (
<YouTube
videoId="2g811Eo7K8U"
opts={opts}
onReady={this._onReady}
/>
);
}
_onReady(event) {
// access to player in all event handlers via event.target
event.target.pauseVideo();
}
}
You can access & control the player in a way similar to the official api:
The
APIcomponent will pass an event object as the sole argument to each ofthose functionsthe event handler props. The event object has the following properties:
- The event's
target
identifies the video player that corresponds to the event.- The event's
data
specifies a value relevant to the event. Note that theonReady
event does not specify adata
property.
MIT
FAQs
react.js powered YouTube player component
The npm package @gradeup/react-youtube receives a total of 0 weekly downloads. As such, @gradeup/react-youtube popularity was classified as not popular.
We found that @gradeup/react-youtube demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 4 open source maintainers 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.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.