From af015814f61972e23dbe88effc0b2f0e22d8480a Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Tue, 5 Oct 2021 10:43:42 +0000 Subject: [PATCH] [FIX] mail: prevent traceback when the audio of a peer is loaded MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, we would reset the audio of a peer before setting a new one which is not necessary as the track remains the same for the whole lifetime of the transceiver (and therefore the peerConnection). Moreover, calling `pause` on the audioElement could lead to a race condition with the following `play` and lead to a traceback. closes odoo/odoo#77883 X-original-commit: e0b957cd3cd657ad15168e35fdaaeebccb7be4be Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/rtc_session/rtc_session.js | 1 - 1 file changed, 1 deletion(-) diff --git a/addons/mail/static/src/models/rtc_session/rtc_session.js b/addons/mail/static/src/models/rtc_session/rtc_session.js index 81d9cdca8a4..e7b6c6637d0 100644 --- a/addons/mail/static/src/models/rtc_session/rtc_session.js +++ b/addons/mail/static/src/models/rtc_session/rtc_session.js @@ -65,7 +65,6 @@ function factory(dependencies) { * @param {boolean} param0.isTalking */ async setAudio({ audioStream, isMuted, isTalking }) { - this._removeAudio(); const audioElement = this.audioElement || new window.Audio(); try { audioElement.srcObject = audioStream;