1
Fork 0
mirror of https://github.com/jech/galene.git synced 2024-11-09 18:25:58 +01:00

Special-case screenshare in setSendParameters.

This avoids restarting the stream when changing simulcast
settings.
This commit is contained in:
Juliusz Chroboczek 2023-07-14 23:59:06 +02:00
parent 5722270cc7
commit a845e9f722

View file

@ -918,6 +918,8 @@ function newUpStream(localId) {
async function setSendParameters(c, bps, simulcast) {
if(!c.up)
throw new Error('Setting throughput of down stream');
if(c.label === 'screenshare')
simulcast = false;
let senders = c.pc.getSenders();
for(let i = 0; i < senders.length; i++) {
let s = senders[i];
@ -1250,12 +1252,12 @@ function setUpStream(c, stream) {
};
let encodings = [];
let simulcast = doSimulcast();
let simulcast = c.label !== 'screenshare' && doSimulcast();
if(t.kind === 'video') {
let bps = getMaxVideoThroughput();
// Firefox doesn't like us setting the RID if we're not
// simulcasting.
if(simulcast && c.label !== 'screenshare') {
if(simulcast) {
encodings.push({
rid: 'h',
maxBitrate: bps || unlimitedRate,