diff --git a/package.json b/package.json index 80a50b25..d629b536 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "express": "4.18.2", "httpolyglot": "0.1.2", "mediasoup": "3.11.3", - "mediasoup-client": "3.6.58", + "mediasoup-client": "3.6.59", "ngrok": "4.3.3", "qs": "6.11.0", "@sentry/node": "7.19.0", diff --git a/public/sfu/MediasoupClient.js b/public/sfu/MediasoupClient.js index 752b693d..34296236 100644 --- a/public/sfu/MediasoupClient.js +++ b/public/sfu/MediasoupClient.js @@ -6422,6 +6422,7 @@ const transceiver = this._mapMidTransceiver.get(localId); if (!transceiver) throw new Error('associated RTCRtpTransceiver not found'); transceiver.sender.replaceTrack(null); + transceiver.stop(); this._pc.removeTrack(transceiver.sender); this._remoteSdp.closeMediaSection(transceiver.mid); const offer = await this._pc.createOffer(); @@ -7031,6 +7032,7 @@ const transceiver = this._mapMidTransceiver.get(localId); if (!transceiver) throw new Error('associated RTCRtpTransceiver not found'); transceiver.sender.replaceTrack(null); + transceiver.stop(); this._pc.removeTrack(transceiver.sender); this._remoteSdp.closeMediaSection(transceiver.mid); const offer = await this._pc.createOffer(); @@ -8138,6 +8140,7 @@ const transceiver = this._mapMidTransceiver.get(localId); if (!transceiver) throw new Error('associated transceiver not found'); transceiver.sender.replaceTrack(null); + transceiver.stop(); this._pc.removeTrack(transceiver.sender); // NOTE: Cannot use closeMediaSection() due to the the note above in send() // method. @@ -9947,6 +9950,7 @@ const transceiver = this._mapMidTransceiver.get(localId); if (!transceiver) throw new Error('associated RTCRtpTransceiver not found'); transceiver.sender.replaceTrack(null); + transceiver.stop(); this._pc.removeTrack(transceiver.sender); this._remoteSdp.closeMediaSection(transceiver.mid); const offer = await this._pc.createOffer(); @@ -11777,7 +11781,7 @@ /** * Expose mediasoup-client version. */ - exports.version = '3.6.58'; + exports.version = '3.6.59'; /** * Expose parseScalabilityMode() function. */