|
|
@@ -153,9 +153,13 @@ export class CodecSelection {
|
|
153
|
153
|
const remoteCodecsPerParticipant = remoteParticipants?.map(remote => {
|
|
154
|
154
|
const peerMediaInfo = session._signalingLayer.getPeerMediaInfo(remote, MediaType.VIDEO);
|
|
155
|
155
|
|
|
156
|
|
- return peerMediaInfo
|
|
157
|
|
- ? peerMediaInfo.codecList ?? [ peerMediaInfo.codecType ]
|
|
158
|
|
- : [];
|
|
|
156
|
+ if (peerMediaInfo?.codecList) {
|
|
|
157
|
+ return peerMediaInfo.codecList;
|
|
|
158
|
+ } else if (peerMediaInfo?.codecType) {
|
|
|
159
|
+ return [ peerMediaInfo.codecType ];
|
|
|
160
|
+ }
|
|
|
161
|
+
|
|
|
162
|
+ return [];
|
|
159
|
163
|
});
|
|
160
|
164
|
|
|
161
|
165
|
const selectedCodecOrder = localPreferredCodecOrder.reduce((acc, localCodec) => {
|
|
|
@@ -167,8 +171,11 @@ export class CodecSelection {
|
|
167
|
171
|
// Remove any codecs that are not supported by any of the remote endpoints. The order of the supported
|
|
168
|
172
|
// codecs locally however will remain the same since we want to support asymmetric codecs.
|
|
169
|
173
|
for (const remoteCodecs of remoteCodecsPerParticipant) {
|
|
170
|
|
- codecNotSupportedByRemote = codecNotSupportedByRemote
|
|
|
174
|
+ // Ignore remote participants that do not publish codec preference in presence (transcriber).
|
|
|
175
|
+ if (remoteCodecs.length) {
|
|
|
176
|
+ codecNotSupportedByRemote = codecNotSupportedByRemote
|
|
171
|
177
|
|| !remoteCodecs.find(participantCodec => participantCodec === localCodec);
|
|
|
178
|
+ }
|
|
172
|
179
|
}
|
|
173
|
180
|
}
|
|
174
|
181
|
|