Restructure offers.

This commit is contained in:
Juliusz Chroboczek
2020-08-12 13:56:35 +02:00
parent bc7bd36ba2
commit 52c4f1a399
2 changed files with 16 additions and 10 deletions
+2 -2
View File
@@ -646,7 +646,7 @@ function serverConnect() {
let m = JSON.parse(e.data);
switch(m.type) {
case 'offer':
gotOffer(m.id, m.labels, m.offer, !!m.renegotiate);
gotOffer(m.id, m.labels, m.offer, m.kind === 'renegotiate');
break;
case 'answer':
gotAnswer(m.id, m.answer);
@@ -1276,10 +1276,10 @@ async function negotiate(id, restartIce) {
send({
type: 'offer',
kind: 'renegotiate',
id: id,
labels: c.labelsByMid,
offer: offer,
renegotiate: true,
});
}