Procházet zdrojové kódy

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

master
Leonard Kim před 6 roky
rodič
revize
c28c70fb2f

+ 3
- 3
react/features/device-selection/components/AudioInputPreview.js Zobrazit soubor

@@ -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
     }

Načítá se…
Zrušit
Uložit