microphone indicator changes opacity with volume level

This commit is contained in:
Stefan Otto
2018-07-17 14:59:45 +02:00
parent 3ab603bbe7
commit 61d395c6d8
3 changed files with 18 additions and 11 deletions
@@ -67,6 +67,8 @@ const ListPeer = (props) =>
off : !micEnabled,
disabled : peer.peerAudioInProgress
})}
style={{ opacity : micEnabled && micConsumer ? (micConsumer.volume/10)
+ 0.2 :1 }}
onClick={(e) =>
{
e.stopPropagation();
@@ -140,7 +142,7 @@ const mapDispatchToProps = (dispatch) =>
},
onEnableWebcam : (peerName) =>
{
dispatch(requestActions.resumePeerVideo(peerName));
},
onDisableWebcam : (peerName) =>
+3 -3
View File
@@ -62,12 +62,12 @@ class Peers extends React.Component
observer.observe(this.refs.peers);
}
componentWillUnmount()
componentWillUnmount()
{
window.removeEventListener('resize', this.updateDimensions);
}
componentDidUpdate()
componentDidUpdate()
{
this.updateDimensions();
}
@@ -81,7 +81,7 @@ class Peers extends React.Component
toolAreaOpen
} = this.props;
const style =
const style =
{
'width' : this.state.peerWidth,
'height' : this.state.peerHeight