Skip to content

Commit

Permalink
fix(codec-selection): Ignore transcriber for calc. codec intersection…
Browse files Browse the repository at this point in the history
… set.
  • Loading branch information
jallamsetty1 committed Feb 14, 2024
1 parent c749528 commit f5f8a13
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions modules/RTC/CodecSelection.js
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,13 @@ export class CodecSelection {
const remoteCodecsPerParticipant = remoteParticipants?.map(remote => {
const peerMediaInfo = session._signalingLayer.getPeerMediaInfo(remote, MediaType.VIDEO);

return peerMediaInfo
? peerMediaInfo.codecList ?? [ peerMediaInfo.codecType ]
: [];
if (peerMediaInfo?.codecList) {
return peerMediaInfo.codecList;
} else if (peerMediaInfo?.codecType) {
return [ peerMediaInfo.codecType ];
}

return [];
});

const selectedCodecOrder = localPreferredCodecOrder.reduce((acc, localCodec) => {
Expand All @@ -167,8 +171,11 @@ export class CodecSelection {
// Remove any codecs that are not supported by any of the remote endpoints. The order of the supported
// codecs locally however will remain the same since we want to support asymmetric codecs.
for (const remoteCodecs of remoteCodecsPerParticipant) {
codecNotSupportedByRemote = codecNotSupportedByRemote
// Ignore remote participants that do not publish codec preference in presence (transcriber).
if (remoteCodecs.length) {
codecNotSupportedByRemote = codecNotSupportedByRemote
|| !remoteCodecs.find(participantCodec => participantCodec === localCodec);
}
}
}

Expand Down

0 comments on commit f5f8a13

Please sign in to comment.