From c28c70fb2ff6a9307fa177933d08c9bd9cae236c Mon Sep 17 00:00:00 2001 From: Leonard Kim Date: Sun, 28 Oct 2018 19:10:58 -0700 Subject: [PATCH] ref(device-selection): change audio preview listener on component update --- .../device-selection/components/AudioInputPreview.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/react/features/device-selection/components/AudioInputPreview.js b/react/features/device-selection/components/AudioInputPreview.js index 987d38995..2953568c4 100644 --- a/react/features/device-selection/components/AudioInputPreview.js +++ b/react/features/device-selection/components/AudioInputPreview.js @@ -63,9 +63,9 @@ class AudioInputPreview extends Component { * @inheritdoc * @returns {void} */ - componentWillReceiveProps(nextProps: Props) { - if (nextProps.track !== this.props.track) { - this._listenForAudioUpdates(nextProps.track); + componentDidUpdate(prevProps: Props) { + if (prevProps.track !== this.props.track) { + this._listenForAudioUpdates(this.props.track); this._updateAudioLevel(0); } }