Created
May 9, 2017 21:15
-
-
Save fforres/d8bb4b85ff4fe3d6f13e31bcb7c755a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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