Przeglądaj źródła

fix(iOS15) fix not being able to unmute if "everyone starts muted" is set

We need to make sure the audio track is added to the JVB connection, or we won't
be able to unmute.

Why this happens is a mystery wrapped in an enigma, it started happening with
iOS 15.

Same thing applies to Safari for macOS.

Fixes: https://github.com/jitsi/jitsi-meet/issues/10104
tags/v0.0.2
Saúl Ibarra Corretgé 4 lat temu
rodzic
commit
1e640cd394
No account linked to committer's email address
1 zmienionych plików z 16 dodań i 4 usunięć
  1. 16
    4
      JitsiConference.js

+ 16
- 4
JitsiConference.js Wyświetl plik

@@ -1104,11 +1104,23 @@ JitsiConference.prototype._fireMuteChangeEvent = function(track) {
1104 1104
  * @returns {Array<JitsiLocalTrack>} - list of local tracks that are unmuted.
1105 1105
  */
1106 1106
 JitsiConference.prototype._getInitialLocalTracks = function() {
1107
-    // Always add the audio track on mobile Safari because of a known issue where audio playout doesn't happen
1108
-    // if the user joins audio and video muted.
1107
+    // Always add the audio track on certain platforms:
1108
+    //  * Safari / WebKit: because of a known issue where audio playout doesn't happen
1109
+    //    if the user joins audio and video muted.
1110
+    //  * React Native: after iOS 15, if a user joins muted they won't be able to unmute.
1109 1111
     return this.getLocalTracks()
1110
-        .filter(track => (track.getType() === MediaType.AUDIO && (!this.isStartAudioMuted() || browser.isIosBrowser()))
1111
-        || (track.getType() === MediaType.VIDEO && !this.isStartVideoMuted()));
1112
+        .filter(track => {
1113
+            const trackType = track.getType();
1114
+
1115
+            if (trackType === MediaType.AUDIO
1116
+                    && (!this.isStartAudioMuted() || browser.isWebKitBased() || browser.isReactNative())) {
1117
+                return true;
1118
+            } else if (trackType === MediaType.VIDEO && !this.isStartVideoMuted()) {
1119
+                return true;
1120
+            }
1121
+
1122
+            return false;
1123
+        });
1112 1124
 };
1113 1125
 
1114 1126
 /**

Ładowanie…
Anuluj
Zapisz