Przeglądaj źródła

feat(CodecSelection) Disable VP9 on Safari. (#1752)

* feat(CodecSelection) Disable VP9 on Safari.
Safari does not decode VP9 properly- https://bugs.webkit.org/show_bug.cgi?id=231071 and https://bugs.webkit.org/show_bug.cgi?id=231074.

* squash move VP9 support check to browser capabilities.
dev1
Jaya Allamsetty 4 lat temu
rodzic
commit
2248531932
No account linked to committer's email address

+ 2
- 6
modules/RTC/CodecSelection.js Wyświetl plik

@@ -47,9 +47,7 @@ export class CodecSelection {
47 47
         logger.debug(`Codec preferences for the conference are JVB: ${this.jvbPreferredCodec},
48 48
             P2P: ${this.p2pPreferredCodec}`);
49 49
 
50
-        // Do not prefer VP9 on Firefox because of the following bug.
51
-        // https://bugzilla.mozilla.org/show_bug.cgi?id=1633876
52
-        if (browser.isFirefox() && this.jvbPreferredCodec === CodecMimeType.VP9) {
50
+        if (this.jvbPreferredCodec === CodecMimeType.VP9 && !browser.supportsVP9()) {
53 51
             this.jvbPreferredCodec = CodecMimeType.VP8;
54 52
         }
55 53
 
@@ -136,11 +134,9 @@ export class CodecSelection {
136 134
                 const peerMediaInfo = session.signalingLayer.getPeerMediaInfo(remote, MediaType.VIDEO);
137 135
                 const peerCodec = peerMediaInfo?.codecType;
138 136
 
139
-                // We do not want Firefox to switch to VP9 because of the following bug.
140
-                // https://bugzilla.mozilla.org/show_bug.cgi?id=1492500.
141 137
                 if (peerCodec
142 138
                     && peerCodec !== currentCodec
143
-                    && !(browser.isFirefox() && peerCodec === CodecMimeType.VP9)) {
139
+                    && (peerCodec !== CodecMimeType.VP9 || browser.supportsVP9())) {
144 140
                     selectedCodec = peerCodec;
145 141
                 }
146 142
             }

+ 9
- 0
modules/browser/BrowserCapabilities.js Wyświetl plik

@@ -210,6 +210,15 @@ export default class BrowserCapabilities extends BrowserDetection {
210 210
         return !this.isFirefox();
211 211
     }
212 212
 
213
+    /**
214
+     * Returns true if VP9 is supported by the client on the browser. VP9 is currently disabled on Firefox and Safari
215
+     * because of issues with rendering. Please check https://bugzilla.mozilla.org/show_bug.cgi?id=1492500,
216
+     * https://bugs.webkit.org/show_bug.cgi?id=231071 and https://bugs.webkit.org/show_bug.cgi?id=231074 for details.
217
+     */
218
+    supportsVP9() {
219
+        return this.isChromiumBased() || this.isReactNative();
220
+    }
221
+
213 222
     /**
214 223
      * Checks if the browser uses SDP munging for turning on simulcast.
215 224
      *

+ 4
- 0
package-lock.json Wyświetl plik

@@ -9370,6 +9370,7 @@
9370 9370
     },
9371 9371
     "@jitsi/sdp-interop": {
9372 9372
       "version": "git+ssh://git@github.com/jitsi/sdp-interop.git#4669790bb9020cc8f10c1d1f3823c26b08497547",
9373
+      "integrity": "sha512-4nqEqJWyRFjHM/riI0DQRNx+mgx277iK0r5LhwVAHDZDBYbLN54vYcfZ6JepcmygQiixa8jet/gLJnikdH9wzQ==",
9373 9374
       "from": "@jitsi/sdp-interop@github:jitsi/sdp-interop#4669790bb9020cc8f10c1d1f3823c26b08497547",
9374 9375
       "requires": {
9375 9376
         "lodash.clonedeep": "4.5.0",
@@ -10822,6 +10823,7 @@
10822 10823
     },
10823 10824
     "eslint-config-jitsi": {
10824 10825
       "version": "git+ssh://git@github.com/jitsi/eslint-config-jitsi.git#974ab743dde38bf2207ad4ea5e4e89cfb98517b1",
10826
+      "integrity": "sha512-8GoxyUSAovN1wsxMUDzaePTBOS/Lw5YMIWFXYRGwAyIltJmtCTmoFTkW/59UEecwVNYYfhP30qHWFrM3LavPLQ==",
10825 10827
       "dev": true,
10826 10828
       "from": "eslint-config-jitsi@github:jitsi/eslint-config-jitsi#974ab743dde38bf2207ad4ea5e4e89cfb98517b1",
10827 10829
       "requires": {}
@@ -11840,6 +11842,7 @@
11840 11842
     },
11841 11843
     "jitsi-meet-logger": {
11842 11844
       "version": "git+ssh://git@github.com/jitsi/jitsi-meet-logger.git#4add5bac2e4cea73a05f42b7596ee03c7f7a2567",
11845
+      "integrity": "sha512-1WC//tMrc8lAxfldhEYFxk8EZuHwBcJgy+QDzd9E7ZJCCm5r+aUYshnx69PLwcbf7iLfKPhcuCKz8FOJRpBdXg==",
11843 11846
       "from": "jitsi-meet-logger@github:jitsi/jitsi-meet-logger#v1.0.0"
11844 11847
     },
11845 11848
     "js-levenshtein": {
@@ -13613,6 +13616,7 @@
13613 13616
     },
13614 13617
     "strophejs-plugin-stream-management": {
13615 13618
       "version": "git+ssh://git@github.com/jitsi/strophejs-plugin-stream-management.git#001cf02bef2357234e1ac5d163611b4d60bf2b6a",
13619
+      "integrity": "sha512-ijQSXeEEmGl4dfLx8RcQDCvzg1UPtEArowaCHZr8ITdBOH/X6JxxGzy/DVeMLVSvSy73tH7pGK6iPjBqQajwdQ==",
13616 13620
       "from": "strophejs-plugin-stream-management@github:jitsi/strophejs-plugin-stream-management#001cf02bef2357234e1ac5d163611b4d60bf2b6a",
13617 13621
       "requires": {}
13618 13622
     },

Ładowanie…
Anuluj
Zapisz