Skip to content

Commit

Permalink
fix(SDP) Add the recvonly SSRC check only for jvb connection
Browse files Browse the repository at this point in the history
  • Loading branch information
jallamsetty1 committed Jan 8, 2025
1 parent 496b64a commit 390124a
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions modules/sdp/SDP.js
Original file line number Diff line number Diff line change
Expand Up @@ -306,8 +306,9 @@ export default class SDP {
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) {
// Do not process recvonly m-lines for JVB connection. Firefox generates recvonly SSRCs for all remote
// sources.
if (isRecvOnly && !this.isP2P) {
return;
}

Expand Down Expand Up @@ -647,7 +648,7 @@ export default class SDP {
continue;
}

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

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

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

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

0 comments on commit 390124a

Please sign in to comment.