Skip to content

Commit

Permalink
fix(JingleSession) Do not signal recvonly SSRCs generated by Firefox.
Browse files Browse the repository at this point in the history
Fixes a regression introduced by a7476b1 where multiple source-adds are sent from Firefox client resulting in Jicofo force muting the sources.
  • Loading branch information
jallamsetty1 committed Jan 8, 2025
1 parent d7dc753 commit 96c2fe4
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions modules/sdp/SDP.js
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,13 @@ export default class SDP {
this.media.forEach((mediaItem, mediaindex) => {
const mid = SDPUtil.parseMID(SDPUtil.findLine(mediaItem, 'a=mid:'));
const mline = SDPUtil.parseMLine(mediaItem.split('\r\n')[0]);
const isRecvOnly = SDPUtil.findLine(mediaItem, `a=${MediaDirection.RECVONLY}`);

// Do not process recvonly m-lines. Firefox generates recvonly SSRCs for all remote sources.
if (isRecvOnly) {
return;
}

const media = {
mediaindex,
mediaType: mline.media,
Expand Down Expand Up @@ -622,6 +629,7 @@ export default class SDP {

let ssrc = false;
const assrcline = SDPUtil.findLine(mediaItem, 'a=ssrc:');
const isRecvOnly = SDPUtil.findLine(mediaItem, `a=${MediaDirection.RECVONLY}`);

if (assrcline) {
ssrc = assrcline.substring(7).split(' ')[0];
Expand All @@ -639,7 +647,7 @@ export default class SDP {
continue;
}

if (ssrc) {
if (ssrc && !isRecvOnly) {
const description = $(content).find('description');
const ssrcMap = SDPUtil.parseSSRC(mediaItem);

Expand Down Expand Up @@ -728,7 +736,7 @@ export default class SDP {
elem.up();
});

if (ssrc) {
if (ssrc && !isRecvOnly) {
const ssrcMap = SDPUtil.parseSSRC(mediaItem);

for (const [ availableSsrc, ssrcParameters ] of ssrcMap) {
Expand Down

0 comments on commit 96c2fe4

Please sign in to comment.