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) =>