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

Implement onnegotiationcompleted callback.

This commit is contained in:
Juliusz Chroboczek 2020-08-26 18:30:29 +02:00
parent 6dc1d72438
commit a4b528e1e7

View file

@ -533,6 +533,8 @@ ServerConnection.prototype.gotOffer = async function(id, labels, offer, renegoti
id: id,
answer: answer,
});
if(c.onnegotiationcompleted)
c.onnegotiationcompleted.call(c);
}
/**
@ -570,6 +572,8 @@ ServerConnection.prototype.gotAnswer = async function(id, answer) {
return;
}
await c.flushIceCandidates();
if(c.onnegotiationcompleted)
c.onnegotiationcompleted.call(c);
}
/**
@ -739,6 +743,13 @@ function Stream(sc, id, pc) {
* @type{function(any): any}
*/
this.onerror = null;
/**
* onnegotiationcompleted is called whenever negotiation or
* renegotiation has completed.
*
* @type{function(): any}
*/
this.onnegotiationcompleted = null;
/**
* ondowntrack is called whenever a new track is added to a stream.
* If the stream parameter differs from its previous value, then it