Add files via upload

This commit is contained in:
Steve Seguin
2025-10-21 21:27:07 -04:00
committed by GitHub
parent 6a1309879d
commit c71061f598
3 changed files with 5645 additions and 14 deletions

View File

@@ -138,7 +138,15 @@ var CodecsHandler = (function() {
}
// Set codec order: preferred codec + error correction + others
var newOrder = [].concat(errorCorrectionNumbers).concat(preferCodecNumber).filter(Boolean);
var newOrder = [];
if (preferCodecNumber) {
newOrder.push(preferCodecNumber);
}
errorCorrectionNumbers.forEach(function(codecNumber) {
if (!newOrder.includes(codecNumber)) {
newOrder.push(codecNumber);
}
});
info.audioCodecNumbers.forEach(function(codecNumber) {
if (!newOrder.includes(codecNumber)) {
newOrder.push(codecNumber);
@@ -511,25 +519,15 @@ var CodecsHandler = (function() {
if (opusIndex) {
opusPayload = getCodecPayloadType(sdpLines[opusIndex]);
}
var redIndex = findLine(sdpLines, 'a=rtpmap', 'red/48000');
var redPayload;
if (redIndex) {
redPayload = getCodecPayloadType(sdpLines[redIndex]);
}
if (!opusPayload && !redPayload) {
if (!opusPayload) {
return sdp;
}
if (opusPayload){
if (debug) console.log("Processing OPUS codec");
sdpLines = processOpus(sdpLines, opusPayload, opusIndex, "OPUS", params, debug);
}
if (redPayload){
if (debug) console.log("Processing RED codec");
sdpLines = processOpus(sdpLines, redPayload, redIndex, "RED", params, debug);
}
return sdpLines.join('\r\n');
}
@@ -720,4 +718,3 @@ var CodecsHandler = (function() {
preferAudioCodec: preferAudioCodec
};
})();

5623
thirdparty/adapter-latest.js vendored Normal file

File diff suppressed because it is too large Load Diff

11
thirdparty/adapter.min.js vendored Normal file

File diff suppressed because one or more lines are too long