Przeglądaj źródła

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

master
Leonard Kim 6 lat temu
rodzic
commit
c28c70fb2f

+ 3
- 3
react/features/device-selection/components/AudioInputPreview.js Wyświetl plik

63
      * @inheritdoc
63
      * @inheritdoc
64
      * @returns {void}
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
             this._updateAudioLevel(0);
69
             this._updateAudioLevel(0);
70
         }
70
         }
71
     }
71
     }

Ładowanie…
Anuluj
Zapisz