From 8ce3ea729f3c679010a588a0d810e80bd1206623 Mon Sep 17 00:00:00 2001 From: jack Date: Wed, 1 Apr 2026 21:33:22 +0700 Subject: [PATCH 1/2] update remote sdp --- src/handlers/sdp/RemoteSdp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/sdp/RemoteSdp.ts b/src/handlers/sdp/RemoteSdp.ts index f3a8f1e8..c1295eac 100644 --- a/src/handlers/sdp/RemoteSdp.ts +++ b/src/handlers/sdp/RemoteSdp.ts @@ -236,7 +236,7 @@ export class RemoteSdp { // Let's try to recycle a closed media section (if any). // NOTE: Yes, we can recycle a closed m=audio section with a new m=video. - const oldMediaSection = this._mediaSections.find(m => m.closed); + const oldMediaSection = this._mediaSections.find(m => m.closed && m.getObject().type === kind); if (oldMediaSection) { this.replaceMediaSection(mediaSection, oldMediaSection.mid); From 9216041495beed1e9b3fc8f9d300464af1439fc9 Mon Sep 17 00:00:00 2001 From: duyjack <46467707+duyjack@users.noreply.github.com> Date: Wed, 8 Apr 2026 23:17:16 +0700 Subject: [PATCH 2/2] Update comment in RemoteSdp.ts Co-authored-by: Astagor --- src/handlers/sdp/RemoteSdp.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/handlers/sdp/RemoteSdp.ts b/src/handlers/sdp/RemoteSdp.ts index c1295eac..3d6e4862 100644 --- a/src/handlers/sdp/RemoteSdp.ts +++ b/src/handlers/sdp/RemoteSdp.ts @@ -235,7 +235,7 @@ export class RemoteSdp { }); // Let's try to recycle a closed media section (if any). - // NOTE: Yes, we can recycle a closed m=audio section with a new m=video. + // NOTE: We cannot recycle a closed m=audio section as m=video (or vice versa). Firefox rejects the SDP when the media type of a recycled m-line changes. const oldMediaSection = this._mediaSections.find(m => m.closed && m.getObject().type === kind); if (oldMediaSection) {