From e1c7c1f9f4840b9ffdc10d2a8a5fe5f7bddca0cb Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Mon, 15 Nov 2021 11:20:20 +0000 Subject: [PATCH] [FIX] mail: prevents disabled video when receiving a broadcast MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, it was possible to lock the transceivers of the streams when the remote was updating this stream. This commit fixes this issue. closes odoo/odoo#79782 X-original-commit: 82c7d6dad5603242e72c45160ac7193e3fb1c350 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/rtc/rtc.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/addons/mail/static/src/models/rtc/rtc.js b/addons/mail/static/src/models/rtc/rtc.js index eb5ea6961e2..1b4a37e6889 100644 --- a/addons/mail/static/src/models/rtc/rtc.js +++ b/addons/mail/static/src/models/rtc/rtc.js @@ -152,7 +152,7 @@ function factory(dependencies) { } /** - * @param {String} sender id of the session that sent the notification + * @param {number|String} sender id of the session that sent the notification * @param {String} content JSON */ async handleNotification(sender, content) { @@ -171,18 +171,18 @@ function factory(dependencies) { switch (event) { case "offer": this._addLogEntry(sender, `received notification: ${event}`, { step: 'received offer' }); - await this._handleRtcTransactionOffer(sender, payload); + await this._handleRtcTransactionOffer(rtcSession.peerToken, payload); break; case "answer": this._addLogEntry(sender, `received notification: ${event}`, { step: 'received answer' }); - await this._handleRtcTransactionAnswer(sender, payload); + await this._handleRtcTransactionAnswer(rtcSession.peerToken, payload); break; case "ice-candidate": - await this._handleRtcTransactionICECandidate(sender, payload); + await this._handleRtcTransactionICECandidate(rtcSession.peerToken, payload); break; case "disconnect": this._addLogEntry(sender, `received notification: ${event}`, { step: ' peer cleanly disconnected ' }); - this._removePeer(sender); + this._removePeer(rtcSession.peerToken); break; case 'trackChange': this._handleTrackChange(rtcSession, payload); @@ -566,7 +566,7 @@ function factory(dependencies) { /** * @private - * @param {String} token + * @param {String} fromToken * @param {Object} param1 * @param {Object} param1.candidate RTCIceCandidateInit */ @@ -728,7 +728,7 @@ function factory(dependencies) { * from the receiving end. * * @private - * @param {Object} constraints MediaStreamTrack constraints + * @param {String} token * @param {Object} [param1] * @param {number} [param1.delay] in ms * @param {string} [param1.reason]