From dfd5deacf4211b4736e0981ea2d5d9dfca6abc62 Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Sun, 18 Sep 2016 12:39:00 +0200 Subject: [PATCH] Volume toggle control in VideoPlayer --- .../components/components/video_player.jsx | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/app/assets/javascripts/components/components/video_player.jsx b/app/assets/javascripts/components/components/video_player.jsx index e680fb206..fa0675413 100644 --- a/app/assets/javascripts/components/components/video_player.jsx +++ b/app/assets/javascripts/components/components/video_player.jsx @@ -1,17 +1,29 @@ import ImmutablePropTypes from 'react-immutable-proptypes'; import PureRenderMixin from 'react-addons-pure-render-mixin'; +import IconButton from './icon_button'; const VideoPlayer = React.createClass({ propTypes: { media: ImmutablePropTypes.map.isRequired }, + getInitialState () { + return { + muted: true + }; + }, + mixins: [PureRenderMixin], + handleClick () { + this.setState({ muted: !this.state.muted }); + }, + render () { return ( -
-