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

Simpler Firefox workaround in addUpTrack.

Rather than trying to determine whether the workaround is needed,
we now perform it unconditionally, and ignore the resulting exception
on non-broken browsers.
This commit is contained in:
Juliusz Chroboczek 2023-04-13 22:26:41 +02:00
parent 3ea4b8a32a
commit 7f93aa5dc8

View file

@ -1265,6 +1265,17 @@ function setUpStream(c, stream) {
streams: [stream],
sendEncodings: encodings,
});
// Firefox before 110 does not implement sendEncodings, and
// requires this hack, which throws an exception on Chromium.
try {
let p = tr.sender.getParameters();
if(!p.encodings) {
p.encodings = encodings;
tr.sender.setParameters(p);
}
} catch(e) {
}
}
// c.stream might be different from stream if there's a filter