ソースを参照

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

master
Leonard Kim 6年前
コミット
c28c70fb2f
1個のファイルの変更3行の追加3行の削除
  1. 3
    3
      react/features/device-selection/components/AudioInputPreview.js

+ 3
- 3
react/features/device-selection/components/AudioInputPreview.js ファイルの表示

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

読み込み中…
キャンセル
保存