react-vimeo-oembed
v1.2.0
Published
React component to easily embed Vimeo videos in your application
Maintainers
Readme
react-vimeo-oembed
React component to embed Vimeo videos!
Installation
Install react-vimeo-oembed with npm:
$ npm install react-vimeo-oembed --saveFor CommonJS users:
import ReactVimeoOembed from 'react-vimeo-oembed';
or
import { ReactVimeoOembed } from 'react-vimeo-oembed';Demo
Clone the repository and move into:
$ git clone [email protected]:RobertPTC/react-vimeo-oembed.git
$ cd react-vimeo-oembedInstall dependencies:
yarn install or npm iPrepare the demo:
yarn demo or npm run demoRun 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
