1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-10 02:35:58 +01:00

Don't set rid when not simulcasting.

It turns out that the bandwidth limitation is not effective
in Firefox when the rid is set unless we're simulcasting.
This commit is contained in:
Juliusz Chroboczek 2022-03-21 19:19:19 +01:00
parent 70163094e9
commit a698011aef

View file

@ -1189,16 +1189,23 @@ function setUpStream(c, stream) {
let simulcast = doSimulcast(); let simulcast = doSimulcast();
if(t.kind === 'video') { if(t.kind === 'video') {
let bps = getMaxVideoThroughput(); let bps = getMaxVideoThroughput();
// Firefox doesn't like us setting the RID if we're not
// simulcasting.
if(simulcast) {
encodings.push({ encodings.push({
rid: 'h', rid: 'h',
maxBitrate: bps || unlimitedRate, maxBitrate: bps || unlimitedRate,
}); });
if(simulcast)
encodings.push({ encodings.push({
rid: 'l', rid: 'l',
scaleResolutionDownBy: 2, scaleResolutionDownBy: 2,
maxBitrate: simulcastRate, maxBitrate: simulcastRate,
}); });
} else {
encodings.push({
maxBitrate: bps || unlimitedRate,
});
}
} else { } else {
if(c.label !== 'camera' || settings.hqaudio) { if(c.label !== 'camera' || settings.hqaudio) {
encodings.push({ encodings.push({