Skip to content

Commit

Permalink
fix(JPC) skip processing remote audio sources when startSilent
Browse files Browse the repository at this point in the history
Avoids having any actual remote audio tracks, which can mess with the
mobile audio session.
  • Loading branch information
saghul committed Jan 21, 2025
1 parent 250ff7e commit 22daa35
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions modules/xmpp/JingleSessionPC.js
Original file line number Diff line number Diff line change
Expand Up @@ -553,6 +553,13 @@ export default class JingleSessionPC extends JingleSession {

for (const description of descriptionsWithSources) {
const mediaType = $(description).attr('media');

if (mediaType === MediaType.AUDIO && this.options.startSilent) {

// eslint-disable-next-line no-continue
continue;
}

const sources = $(description).find('>source');
const removeSsrcs = [];

Expand Down Expand Up @@ -1835,6 +1842,12 @@ export default class JingleSessionPC extends JingleSession {
if (!FeatureFlags.isSsrcRewritingSupported()) {
return;
}

if (mediaType === MediaType.AUDIO && this.options.startSilent) {

return;
}

const newSsrcs = [];

for (const src of message.mappedSources) {
Expand Down

0 comments on commit 22daa35

Please sign in to comment.