Created
January 18, 2016 18:29
-
-
Save arqex/1a914ed51c2bc398945b to your computer and use it in GitHub Desktop.
9.NonFunctionalReact Autoplay
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
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