mirror of
https://github.com/jech/galene.git
synced 2024-11-26 02:25:58 +01:00
Remove half-baked compatibility code for old browsers.
This commit is contained in:
parent
9560779eb4
commit
426c1e06d8
1 changed files with 13 additions and 15 deletions
|
@ -1217,13 +1217,16 @@ async function negotiate(id) {
|
||||||
let c = up[id];
|
let c = up[id];
|
||||||
if(!c)
|
if(!c)
|
||||||
throw new Error('unknown connection');
|
throw new Error('unknown connection');
|
||||||
|
|
||||||
|
if(typeof(c.pc.getTransceivers) !== 'function')
|
||||||
|
throw new Error('Browser too old, please upgrade');
|
||||||
|
|
||||||
let offer = await c.pc.createOffer({});
|
let offer = await c.pc.createOffer({});
|
||||||
if(!offer)
|
if(!offer)
|
||||||
throw(new Error("Didn't create offer"));
|
throw(new Error("Didn't create offer"));
|
||||||
await c.pc.setLocalDescription(offer);
|
await c.pc.setLocalDescription(offer);
|
||||||
|
|
||||||
// mids are not known until this point
|
// mids are not known until this point
|
||||||
if(typeof(c.pc.getTransceivers) === 'function') {
|
|
||||||
c.pc.getTransceivers().forEach(t => {
|
c.pc.getTransceivers().forEach(t => {
|
||||||
if(t.sender && t.sender.track) {
|
if(t.sender && t.sender.track) {
|
||||||
let label = c.labels[t.sender.track.id];
|
let label = c.labels[t.sender.track.id];
|
||||||
|
@ -1233,11 +1236,6 @@ async function negotiate(id) {
|
||||||
console.warn("Couldn't find label for track");
|
console.warn("Couldn't find label for track");
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
} else {
|
|
||||||
console.warn('getTransceivers undefined');
|
|
||||||
displayWarning('getTransceivers undefined, please upgrade your browser');
|
|
||||||
// let the server deal with the mess
|
|
||||||
}
|
|
||||||
|
|
||||||
send({
|
send({
|
||||||
type: 'offer',
|
type: 'offer',
|
||||||
|
|
Loading…
Reference in a new issue