Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/handlers/sdp/RemoteSdp.ts
Original file line number Diff line number Diff line change
Expand Up @@ -235,8 +235,8 @@ 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);
// 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) {
this.replaceMediaSection(mediaSection, oldMediaSection.mid);
Expand Down