react-vimeo-oembed
React component to embed Vimeo videos!
Installation
Install react-vimeo-oembed
with npm:
$ npm install react-vimeo-oembed --save
For CommonJS users:
;or;
Demo
Clone the repository and move into:
$ git clone git@github.com:RobertPTC/react-vimeo-oembed.git$ cd react-vimeo-oembed
Install dependencies:
yarn install or npm i
Prepare the demo:
yarn demo or npm run demo
Run the server:
Open your browser and go to http://localhost:8080/
Props
Name | Type | Description |
---|---|---|
videoId |
Number |
ID of the video you would like to show. |
options |
Object |
Options that determine how the video shows. Defaults to those found here. |
LoadingComponent |
Element |
Loader element. Shows as the Vimeo script tag is loading. |
errorCallback |
Function |
Function called if something goes wrong loading the Vimeo Oembed Player. Supplied with error object as argument. |
scriptLoadCallback |
Function |
Function called when Vimeo Oembed Player script has loaded. Supplied with the video JSON response as argument. |
className |
String |
Class applied to div containing the Vimeo Oembed Player. iframe. |
style |
Object |
Style applied to div containing the Vimeo Oembed Player iframe. |
Contribute
- Submit an issue
- Fork the repository
- Create a dedicated branch (never ever work in
master
) - Fix bugs or implement features
- Write tests