mirror of https://github.com/jech/galene.git
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
|
@ -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 New Issue