浏览代码

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

master
Leonard Kim 7 年前
父节点
当前提交
c28c70fb2f
共有 1 个文件被更改,包括 3 次插入3 次删除
  1. 3
    3
      react/features/device-selection/components/AudioInputPreview.js

+ 3
- 3
react/features/device-selection/components/AudioInputPreview.js 查看文件

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
     }

正在加载...
取消
保存