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
|
||||
* @returns {void}
|
||||
*/
|
||||
componentWillReceiveProps(nextProps: Props) {
|
||||
if (nextProps.track !== this.props.track) {
|
||||
this._listenForAudioUpdates(nextProps.track);
|
||||
componentDidUpdate(prevProps: Props) {
|
||||
if (prevProps.track !== this.props.track) {
|
||||
this._listenForAudioUpdates(this.props.track);
|
||||
this._updateAudioLevel(0);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue