Browse Source

fix(JingleSessionPC): Do not try to re-use inactive mid for new remote ssrcs.

The direction was marked as 'inactive' only on Firefox as Safari had audio issues when an inactive mid is re-used. Chrome (in unified-plan) needs the direction of the mid in remote desc to be set to 'inactive' for a 'removetrack' to be fired on the associated media stream whenever a remote source is removed.
dev1
Jaya Allamsetty 3 years ago
parent
commit
058fdf055d
3 changed files with 5 additions and 11 deletions
  1. 2
    7
      modules/xmpp/JingleSessionPC.js
  2. 2
    3
      package-lock.json
  3. 1
    1
      package.json

+ 2
- 7
modules/xmpp/JingleSessionPC.js View File

1813
                     if (mid > -1) {
1813
                     if (mid > -1) {
1814
                         remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
1814
                         remoteSdp.media[mid] = remoteSdp.media[mid].replace(`${line}\r\n`, '');
1815
 
1815
 
1816
-                        // Change the direction to "inactive" only on Firefox. Audio fails on
1817
-                        // Safari (possibly Chrome in unified plan mode) when we try to re-use inactive
1818
-                        // m-lines due to a webkit bug.
1819
-                        // https://bugs.webkit.org/show_bug.cgi?id=211181
1820
-                        if (browser.isFirefox()) {
1821
-                            remoteSdp.media[mid] = remoteSdp.media[mid].replace('a=sendonly', 'a=inactive');
1822
-                        }
1816
+                        // Change the direction to "inactive".
1817
+                        remoteSdp.media[mid] = remoteSdp.media[mid].replace('a=sendonly', 'a=inactive');
1823
                     }
1818
                     }
1824
                 });
1819
                 });
1825
             }
1820
             }

+ 2
- 3
package-lock.json View File

1314
       }
1314
       }
1315
     },
1315
     },
1316
     "@jitsi/sdp-interop": {
1316
     "@jitsi/sdp-interop": {
1317
-      "version": "1.0.3",
1318
-      "resolved": "https://registry.npmjs.org/@jitsi/sdp-interop/-/sdp-interop-1.0.3.tgz",
1319
-      "integrity": "sha512-3dua2TTDWwpFpdEl+sMEei4d/+VgVXMpQRCPdvzzOidiiHnJ0vAJONfndKJmhhaqYv+e71Ry5IPGV1ZSWjIDJw==",
1317
+      "version": "github:jitsi/sdp-interop#5fc4af6dcf8a6e6af9fedbcd654412fd47b1b4ae",
1318
+      "from": "github:jitsi/sdp-interop#5fc4af6dcf8a6e6af9fedbcd654412fd47b1b4ae",
1320
       "requires": {
1319
       "requires": {
1321
         "lodash.clonedeep": "4.5.0",
1320
         "lodash.clonedeep": "4.5.0",
1322
         "sdp-transform": "2.3.0"
1321
         "sdp-transform": "2.3.0"

+ 1
- 1
package.json View File

17
   "readmeFilename": "README.md",
17
   "readmeFilename": "README.md",
18
   "dependencies": {
18
   "dependencies": {
19
     "@jitsi/js-utils": "1.0.2",
19
     "@jitsi/js-utils": "1.0.2",
20
-    "@jitsi/sdp-interop": "1.0.3",
20
+    "@jitsi/sdp-interop": "github:jitsi/sdp-interop#5fc4af6dcf8a6e6af9fedbcd654412fd47b1b4ae",
21
     "@jitsi/sdp-simulcast": "0.4.0",
21
     "@jitsi/sdp-simulcast": "0.4.0",
22
     "async": "0.9.0",
22
     "async": "0.9.0",
23
     "base64-js": "1.3.1",
23
     "base64-js": "1.3.1",

Loading…
Cancel
Save