0.0.6 • Published 8 years ago

stateful-react-youtube v0.0.6

Weekly downloads
2
License
ISC
Repository
github
Last release
8 years ago

Stateful React YouTube

A React YouTube API Wrapper that allows declarative video control via props. This component is especially useful if you plan on creating an alternative timeline for YouTube videos.

funny img

##----> Demo <----

Installation

npm install --save stateful-react-youtube

##Usage Include the YouTube API in your html file:

<script src="https://www.youtube.com/player_api"></script>

Fire it up:

import YouTubeVideo from "stateful-react-youtube";
//...
//in render:
<YouTubeVideo
  position={this.state.position}
  videoId={this.state.videoId}
  playing={this.state.playing}
  volume={this.state.volume}
  shouldPrestart={true}

  onPlayingChange={this.onPlayingChange}
  onReady={this.handleOnReady}
  onProgress={this.setPosition}
  onVolumeChange={this.handleVolumeChange}
  ></YouTubeVideo>

API

###props (non functions)

###Escape hatch You can access the YouTube API by putting a ref on the YouTubeVideo component and accessing this.refs.yourRefName.player

##Todos

  • Tests

##Other

This library was crafted with care by Moritz Kobrna & Calvin Claus.

0.0.6

8 years ago

0.0.5

8 years ago

0.0.4

8 years ago

0.0.2

8 years ago

0.0.1

8 years ago

0.0.0

8 years ago