1.2.0 • Published 7 years ago

react-vimeo-oembed v1.2.0

Weekly downloads
36
License
MIT
Repository
github
Last release
7 years ago

Build Status

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:

import ReactVimeoOembed from 'react-vimeo-oembed';
or
import { ReactVimeoOembed } from 'react-vimeo-oembed';

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

NameTypeDescription
videoIdNumberID of the video you would like to show.
optionsObjectOptions that determine how the video shows. Defaults to those found here.
LoadingComponentElementLoader element. Shows as the Vimeo script tag is loading.
errorCallbackFunctionFunction called if something goes wrong loading the Vimeo Oembed Player. Supplied with error object as argument.
scriptLoadCallbackFunctionFunction called when Vimeo Oembed Player script has loaded. Supplied with the video JSON response as argument.
classNameStringClass applied to div containing the Vimeo Oembed Player. iframe.
styleObjectStyle applied to div containing the Vimeo Oembed Player iframe.

Contribute

  1. Submit an issue
  2. Fork the repository
  3. Create a dedicated branch (never ever work in master)
  4. Fix bugs or implement features
  5. Write tests

Thanks for using this component!