mirror of
https://github.com/jech/galene.git
synced 2024-11-10 02:35:58 +01:00
More paranoid match for Firefox bandwidth workaround.
This commit is contained in:
parent
a698011aef
commit
de63449150
1 changed files with 13 additions and 1 deletions
|
@ -1220,8 +1220,20 @@ function setUpStream(c, stream) {
|
||||||
});
|
});
|
||||||
|
|
||||||
// Firefox workaround
|
// Firefox workaround
|
||||||
|
function match(a, b) {
|
||||||
|
if(!a || !b)
|
||||||
|
return false;
|
||||||
|
if(a.length !== b.length)
|
||||||
|
return false;
|
||||||
|
for(let i = 0; i < a.length; i++) {
|
||||||
|
if(a.maxBitrate !== b.maxBitrate)
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
let p = tr.sender.getParameters();
|
let p = tr.sender.getParameters();
|
||||||
if(!p.encodings || p.encodings.length != encodings.length) {
|
if(!p || !match(p.encodings, encodings)) {
|
||||||
p.encodings = encodings;
|
p.encodings = encodings;
|
||||||
tr.sender.setParameters(p);
|
tr.sender.setParameters(p);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue