mirror of
https://github.com/jech/galene.git
synced 2024-12-22 23:35:46 +01:00
Maintain information about whether renegotiation is permitted.
Renegotiation is not correct when the stream is fresh, for example after the user has switched the camera.
This commit is contained in:
parent
39789dc89a
commit
346f93dd16
1 changed files with 9 additions and 1 deletions
|
@ -701,6 +701,13 @@ function Stream(sc, id, pc) {
|
|||
* @type {Array.<RTCIceCandidate>}
|
||||
*/
|
||||
this.iceCandidates = [];
|
||||
/**
|
||||
* Indicates whether it is legal to renegotiate at this point. If
|
||||
* this is false, a new connection must be negotiated.
|
||||
*
|
||||
* @type {boolean}
|
||||
*/
|
||||
this.renegotiate = false;
|
||||
/**
|
||||
* The statistics last computed by the stats handler. This is
|
||||
* a dictionary indexed by track id, with each value a disctionary of
|
||||
|
@ -854,11 +861,12 @@ Stream.prototype.negotiate = async function (restartIce) {
|
|||
|
||||
c.sc.send({
|
||||
type: 'offer',
|
||||
kind: 'renegotiate',
|
||||
kind: this.renegotiate ? 'renegotiate' : '',
|
||||
id: c.id,
|
||||
labels: c.labelsByMid,
|
||||
offer: offer,
|
||||
});
|
||||
this.renegotiate = true;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue