mirror of
https://github.com/SrIzan10/vdo.ninja.git
synced 2026-05-01 11:05:24 +00:00
Add files via upload
This commit is contained in:
25
thirdparty/CodecsHandler.js
vendored
25
thirdparty/CodecsHandler.js
vendored
@@ -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
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
11
thirdparty/adapter.min.js
vendored
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user