A React video component based on Plyr.
Add react-plyr
into your package.json dependencies:
npm install react-plyr --save
Include the plyr.css
stylsheet into your <head>
<link rel="stylesheet" href="path/to/plyr.css">
If you want to use our CDN (provided by Fastly) for the default CSS, you can use the following:
<link rel="stylesheet" href="https://cdn.plyr.io/3.3.21/plyr.css">
import Plyr from 'react-plyr';
// add the component in the render function
render() {
return (
<Plyr
type="youtube" // or "vimeo"
videoId="CDFN1VatiJA"
/>
)
}
Note: The videoId
can either be the video ID or URL for the media.
[WIP]
Please open an issue for support.
Please contribute using Github Flow. Create a branch, add commits, and open a pull request.