Sfoglia il codice sorgente

fix(JingleSession): Reject all m-lines associated with sources in source-remove.

Fixes an issue when a screenshare doesn't show up on remote endpoints after one of the endpoints in the call does an ICE RESTART using session-terminate while it has 2 video sources.
release-8443
Jaya Allamsetty 2 anni fa
parent
commit
6c4381c892
1 ha cambiato i file con 7 aggiunte e 10 eliminazioni
  1. 7
    10
      modules/xmpp/JingleSessionPC.js

+ 7
- 10
modules/xmpp/JingleSessionPC.js Vedi File

2039
 
2039
 
2040
                 lines.forEach(line => {
2040
                 lines.forEach(line => {
2041
                     mid = remoteSdp.media.findIndex(mLine => mLine.includes(line));
2041
                     mid = remoteSdp.media.findIndex(mLine => mLine.includes(line));
2042
-
2043
                     if (mid > -1) {
2042
                     if (mid > -1) {
2044
                         remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
2043
                         remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
2045
                         if (this.isP2P) {
2044
                         if (this.isP2P) {
2054
                             // Jvb connections will have direction set to 'sendonly' for the remote sources.
2053
                             // Jvb connections will have direction set to 'sendonly' for the remote sources.
2055
                             remoteSdp.media[mid] = remoteSdp.media[mid]
2054
                             remoteSdp.media[mid] = remoteSdp.media[mid]
2056
                                 .replace(`a=${MediaDirection.SENDONLY}`, `a=${MediaDirection.INACTIVE}`);
2055
                                 .replace(`a=${MediaDirection.SENDONLY}`, `a=${MediaDirection.INACTIVE}`);
2056
+
2057
+                            // Reject the m-line so that the browser removes the associated transceiver from the list
2058
+                            // of available transceivers. This will prevent the client from trying to re-use these
2059
+                            // inactive transceivers when additional video sources are added to the peerconnection.
2060
+                            const { media, port } = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0]);
2061
+
2062
+                            remoteSdp.media[mid] = remoteSdp.media[mid].replace(`m=${media} ${port}`, `m=${media} 0`);
2057
                         }
2063
                         }
2058
                     }
2064
                     }
2059
                 });
2065
                 });
2060
-
2061
-                // Reject the m-line so that the browser removes the associated transceiver from the list of available
2062
-                // transceivers. This will prevent the client from trying to re-use these inactive transceivers when
2063
-                // additional video sources are added to the peerconnection.
2064
-                if (mid > -1 && !this.isP2P && FeatureFlags.isMultiStreamSendSupportEnabled()) {
2065
-                    const { media, port } = SDPUtil.parseMLine(remoteSdp.media[mid].split('\r\n')[0]);
2066
-
2067
-                    remoteSdp.media[mid] = remoteSdp.media[mid].replace(`m=${media} ${port}`, `m=${media} 0`);
2068
-                }
2069
             } else {
2066
             } else {
2070
                 lines.forEach(line => {
2067
                 lines.forEach(line => {
2071
                     remoteSdp.media[idx] = remoteSdp.media[idx].replace(`${line}\r\n`, '');
2068
                     remoteSdp.media[idx] = remoteSdp.media[idx].replace(`${line}\r\n`, '');

Loading…
Annulla
Salva