Security News
Weekly Downloads Now Available in npm Package Search Results
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
react-vimeo
Advanced tools
var Vimeo = require('react-vimeo');
React.render(
<Vimeo videoId={ videoId } />,
$mountNode
);
To handle errors, you can pass a function to the onError
prop:
function onError(err) {
console.error(err);
};
React.render(
<Video onError={ onError } videoId={ videoId } />
document.querySelector('#your-div')
);
There are some things that you should know about the component. The first one is the structure created inside by the component if you wish to stylize it.
So, the semantic HTML structure will be something like this:
<div class='vimeo'>
<div class='vimeo-loading'>
<svg>...</svg>
</div>
<div class='vimeo-image'>
<button type='button' class='vimeo-play-button'>
<svg>...</svg>
</button>
</div>
<div class='video-embed'>
<iframe>...</iframe>
</div>
</div>
This is a very simple structure to stylize however you want. So, if you are lost, don't panic, there is an example live here that you can follow.
For more details, check out the API
MIT
See the License file.
September 2, 2016 v0.2.1
This release adds the ability to provide a custom Play Button element. Thanks goes to @tanepiper
This release also adds a CHANGELOG and officially adds OpenOpenSource guidelines to CONTRIBUTING.
FAQs
React component to load video from Vimeo
The npm package react-vimeo receives a total of 1,604 weekly downloads. As such, react-vimeo popularity was classified as popular.
We found that react-vimeo 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.
Security News
Socket's package search now displays weekly downloads for npm packages, helping developers quickly assess popularity and make more informed decisions.
Security News
A Stanford study reveals 9.5% of engineers contribute almost nothing, costing tech $90B annually, with remote work fueling the rise of "ghost engineers."
Research
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.