|
|
@@ -3043,10 +3043,6 @@ TraceablePeerConnection.prototype._createOfferOrAnswer = function(
|
|
3043
|
3043
|
let capabilities = RTCRtpReceiver.getCapabilities(mediaType)?.codecs;
|
|
3044
|
3044
|
|
|
3045
|
3045
|
if (transceivers.length && capabilities) {
|
|
3046
|
|
- // Remove codecs that are not in the preferred list.
|
|
3047
|
|
- capabilities = capabilities
|
|
3048
|
|
- .filter(caps => codecList.find(codec => `${mediaType}/${codec}` === caps.mimeType.toLowerCase()));
|
|
3049
|
|
-
|
|
3050
|
3046
|
// Rearrange the codec list as per the preference order.
|
|
3051
|
3047
|
for (const codec of codecList.slice().reverse()) {
|
|
3052
|
3048
|
// Move the desired codecs (all variations of it as well) to the beginning of the list
|