Browse Source

ref(device-selection): change audio preview listener on component update

master
Leonard Kim 6 years ago
parent
commit
c28c70fb2f
1 changed files with 3 additions and 3 deletions
  1. 3
    3
      react/features/device-selection/components/AudioInputPreview.js

+ 3
- 3
react/features/device-selection/components/AudioInputPreview.js View File

@@ -63,9 +63,9 @@ class AudioInputPreview extends Component<Props, State> {
63 63
      * @inheritdoc
64 64
      * @returns {void}
65 65
      */
66
-    componentWillReceiveProps(nextProps: Props) {
67
-        if (nextProps.track !== this.props.track) {
68
-            this._listenForAudioUpdates(nextProps.track);
66
+    componentDidUpdate(prevProps: Props) {
67
+        if (prevProps.track !== this.props.track) {
68
+            this._listenForAudioUpdates(this.props.track);
69 69
             this._updateAudioLevel(0);
70 70
         }
71 71
     }

Loading…
Cancel
Save