Skip to content

Instantly share code, notes, and snippets.

@arqex
Created January 18, 2016 18:29
Show Gist options
  • Save arqex/1a914ed51c2bc398945b to your computer and use it in GitHub Desktop.
Save arqex/1a914ed51c2bc398945b to your computer and use it in GitHub Desktop.
9.NonFunctionalReact Autoplay
var VideoWrapper = React.createClass({
render: function() {
return (
<Video ref="video" src="path/to/my/video.mp4" onEnded={ this.replay } />
);
},
replay: function(){
this.refs.video.playOrPause();
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment