Jitsi Meet - Secure, Simple and Scalable Video Conferences that you use as a standalone app or embed in your web application.
TypeScript debiandeep-videojitsijitsi-meetscalable-video-conferencessfuvideovideo-communicationvideo-conferencingwebrtc
fix(Thumbnail): volume & audioLevel default values
Hristo Terezovdb48dc3ed34f
diff --git a/react/features/audio-level-indicator/components/AudioLevelIndicator.js b/react/features/audio-level-indicator/components/AudioLevelIndicator.jsindex c26e3a4d54..9d059d3c99 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<Props> {* @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.jsindex 0c64524d33..4ef45f8652 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<Props, State> {_videoTrack} = this.props;const { id } = _participant || {};- const { audioLevel = 0 } = this.state;+ const { audioLevel } = this.state;return (@@ -447,7 +447,7 @@ class Thumbnail extends Component<Props, State> {_startSilent} = this.props;const { id } = _participant;- const { audioLevel = 0, volume = 1 } = this.state;+ const { audioLevel, volume } = this.state;// hide volume when in silent modeconst 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.jsindex 781687d29c..53b64baec4 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<Props> {participantID = { participantID } />);- if (onVolumeChange) {+ if (onVolumeChange && initialVolumeValue && !isNaN(initialVolumeValue)) {buttons.push(<VolumeSliderinitialValue = { initialVolumeValue }