diff --git a/app/assets/javascripts/components/components/video_player.jsx b/app/assets/javascripts/components/components/video_player.jsx index fcf966d839c..209db33a7fd 100644 --- a/app/assets/javascripts/components/components/video_player.jsx +++ b/app/assets/javascripts/components/components/video_player.jsx @@ -46,11 +46,23 @@ const VideoPlayer = React.createClass({ this.setState({ muted: !this.state.muted }); }, + handleVideoClick (e) { + e.stopPropagation(); + + const node = ReactDOM.findDOMNode(this).querySelector('video'); + + if (node.paused) { + node.play(); + } else { + node.pause(); + } + }, + render () { return (
-
); }