Quellcode durchsuchen

fix(p2p) Fix an issue where unmute fails on p2p with channelLastN=0.

Always initiate a sRD->cA->sLD cycle since renegotiation fails in the following scenario.
In a p2p call when channelLastN=0, the direction on the video tranceiver is set to'inactive'.
At this point, if the user unmutes, the track is replaced on the video sender.
If a cO->sLD->sRD is triggered, the browser adds a third m-line which isn't expected and possibly is a bug. All renegotiations fail as a result.
However, the browser does not add a third m-line in the answer it generates and renegotiation succeeds.
tags/v0.0.2
Jaya Allamsetty vor 2 Jahren
Ursprung
Commit
e2b453a248
1 geänderte Dateien mit 13 neuen und 1 gelöschten Zeilen
  1. 13
    1
      modules/xmpp/JingleSessionPC.js

+ 13
- 1
modules/xmpp/JingleSessionPC.js Datei anzeigen

2395
                     if (shouldRenegotiate
2395
                     if (shouldRenegotiate
2396
                         && (oldTrack || newTrack)
2396
                         && (oldTrack || newTrack)
2397
                         && this.state === JingleSessionState.ACTIVE) {
2397
                         && this.state === JingleSessionState.ACTIVE) {
2398
-                        promise = this._renegotiate().then(() => {
2398
+                        const remoteSdp = this.peerconnection.remoteDescription.sdp;
2399
+                        const remoteDescription = new RTCSessionDescription({
2400
+                            type: 'offer',
2401
+                            sdp: remoteSdp
2402
+                        });
2403
+
2404
+                        // Always initiate a sRD->cA->sLD cycle since renegotiation fails in the following scenario.
2405
+                        // In a p2p call when channelLastN=0, the direction on the video tranceiver is set to
2406
+                        // 'inactive'. At this point, if the user unmutes, the track is replaced on the video sender.
2407
+                        // If a cO->sLD->sRD is triggered, the browser adds a third m-line which isn't expected and
2408
+                        // possibly is a bug. All renegotiations fail as a result. However, the browser does not add a
2409
+                        // third m-line in the answer it generates and renegotiation succeeds.
2410
+                        promise = this._responderRenegotiate(remoteDescription).then(() => {
2399
                             const newLocalSDP = new SDP(this.peerconnection.localDescription.sdp);
2411
                             const newLocalSDP = new SDP(this.peerconnection.localDescription.sdp);
2400
 
2412
 
2401
                             this.notifyMySSRCUpdate(new SDP(oldLocalSdp), newLocalSDP);
2413
                             this.notifyMySSRCUpdate(new SDP(oldLocalSdp), newLocalSDP);

Laden…
Abbrechen
Speichern