Skip to content

Instantly share code, notes, and snippets.

@fforres
Created May 9, 2017 21:15
Show Gist options
  • Save fforres/d8bb4b85ff4fe3d6f13e31bcb7c755a5 to your computer and use it in GitHub Desktop.
Save fforres/d8bb4b85ff4fe3d6f13e31bcb7c755a5 to your computer and use it in GitHub Desktop.
class Video extends React.Component {
static defaultProps = {
autoPlay: false,
maxLoops: 10,
}
static propTypes = {
autoPlay: React.PropTypes.bool.isRequired,
maxLoops: React.PropTypes.number.isRequired,
posterFrameSrc: React.PropTypes.string.isRequired,
videoSrc: React.PropTypes.string.isRequired,
}
state = {
loopsRemaining: this.props.maxLoops,
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment