diff options
author | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-08-15 00:35:34 +0300 |
---|---|---|
committer | Daniel Calviño Sánchez <danxuliu@gmail.com> | 2021-08-23 14:46:19 +0300 |
commit | 2b9edfb09582c6fbe9b5f89937f741b7d538c64f (patch) | |
tree | d20e0d082825f5c73ea788505fd8f6386db30073 /src | |
parent | b731719aa0e8bd2c2566c9bef5d9a7bd0acb6553 (diff) |
Fix connection quality warning still shown after media is stopped
When the audio/video or the screen peers were cleared the connection
quality data was not reset. Due to this the connection quality warning
would be kept shown if, for example, the screen share was stopped while
the warning was being shown.
For simplicity and consistency the connection quality data is reset too
when a different peer connection is set (not just when it is cleared),
although this is not really needed as the previous connection quality
was already cleared in that case further in the code path.
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js b/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js index a9d010713..a8a0a1660 100644 --- a/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js +++ b/src/utils/webrtc/analyzers/PeerConnectionAnalyzer.js @@ -215,6 +215,9 @@ PeerConnectionAnalyzer.prototype = { this._peerConnection = peerConnection this._peerDirection = peerDirection + this._setConnectionQualityAudio(CONNECTION_QUALITY.UNKNOWN) + this._setConnectionQualityVideo(CONNECTION_QUALITY.UNKNOWN) + if (this._peerConnection) { this._peerConnection.addEventListener('iceconnectionstatechange', this._handleIceConnectionStateChangedBound) this._handleIceConnectionStateChangedBound() |