ref(device-selection): change audio preview listener on component update
This commit is contained in:
parent
280178f5d1
commit
c28c70fb2f
|
@ -63,9 +63,9 @@ class AudioInputPreview extends Component<Props, State> {
|
||||||
* @inheritdoc
|
* @inheritdoc
|
||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
componentWillReceiveProps(nextProps: Props) {
|
componentDidUpdate(prevProps: Props) {
|
||||||
if (nextProps.track !== this.props.track) {
|
if (prevProps.track !== this.props.track) {
|
||||||
this._listenForAudioUpdates(nextProps.track);
|
this._listenForAudioUpdates(this.props.track);
|
||||||
this._updateAudioLevel(0);
|
this._updateAudioLevel(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue