diff --git a/react/features/audio-level-indicator/components/AudioLevelIndicator.js b/react/features/audio-level-indicator/components/AudioLevelIndicator.js index c26e3a4d5..9d059d3c9 100644 --- a/react/features/audio-level-indicator/components/AudioLevelIndicator.js +++ b/react/features/audio-level-indicator/components/AudioLevelIndicator.js @@ -39,8 +39,11 @@ class AudioLevelIndicator extends Component { * @returns {ReactElement} */ render() { + const { audioLevel: passedAudioLevel } = this.props; + // First make sure we are sensitive enough. - const audioLevel = Math.min(this.props.audioLevel * 1.2, 1); + const audioLevel = typeof passedAudioLevel === 'number' && !isNaN(passedAudioLevel) + ? Math.min(passedAudioLevel * 1.2, 1) : 0; // Let's now stretch the audio level over the number of dots we have. const stretchedAudioLevel = AUDIO_LEVEL_DOTS * audioLevel; diff --git a/react/features/filmstrip/components/web/Thumbnail.js b/react/features/filmstrip/components/web/Thumbnail.js index 0c64524d3..4ef45f865 100644 --- a/react/features/filmstrip/components/web/Thumbnail.js +++ b/react/features/filmstrip/components/web/Thumbnail.js @@ -401,7 +401,7 @@ class Thumbnail extends Component { _videoTrack } = this.props; const { id } = _participant || {}; - const { audioLevel = 0 } = this.state; + const { audioLevel } = this.state; return ( @@ -447,7 +447,7 @@ class Thumbnail extends Component { _startSilent } = this.props; const { id } = _participant; - const { audioLevel = 0, volume = 1 } = this.state; + const { audioLevel, volume } = this.state; // hide volume when in silent mode const onVolumeChange = _startSilent ? undefined : this._onVolumeChange; diff --git a/react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js b/react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js index 781687d29..53b64baec 100644 --- a/react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js +++ b/react/features/remote-video-menu/components/web/RemoteVideoMenuTriggerButton.js @@ -75,7 +75,7 @@ type Props = { * A value between 0 and 1 indicating the volume of the participant's * audio element. */ - initialVolumeValue: number, + initialVolumeValue: ?number, /** * Callback to invoke when changing the level of the participant's @@ -210,7 +210,7 @@ class RemoteVideoMenuTriggerButton extends Component { participantID = { participantID } /> ); - if (onVolumeChange) { + if (onVolumeChange && initialVolumeValue && !isNaN(initialVolumeValue)) { buttons.push(