Переглянути джерело

fix(Android/ConnectionService): mic not working

Turns out the microphone will not work on some devices when starting in
"audio only", because the audio mode is not set to the MODE_IN_COMMUNICATION,
but to the MODE_IN_CALL. Calling setAudioModeIsVoip(true) makes
the system adjust to MODE_IN_COMMUNICATION and the mic works fine.
j8
paweldomas 6 роки тому
джерело
коміт
3b24124d57

+ 4
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/ConnectionService.java Переглянути файл

@@ -191,6 +191,9 @@ public class ConnectionService extends android.telecom.ConnectionService {
191 191
             request.getAddress(),
192 192
             TelecomManager.PRESENTATION_ALLOWED);
193 193
         connection.setExtras(request.getExtras());
194
+
195
+        connection.setAudioModeIsVoip(true);
196
+
194 197
         // NOTE there's a time gap between the placeCall and this callback when
195 198
         // things could get out of sync, but they are put back in sync once
196 199
         // the startCall Promise is resolved below. That's because on
@@ -426,7 +429,7 @@ public class ConnectionService extends android.telecom.ConnectionService {
426 429
         @Override
427 430
         public String toString() {
428 431
             return String.format(
429
-                    "ConnectionImpl[adress=%s, uuid=%s]@%d",
432
+                    "ConnectionImpl[address=%s, uuid=%s]@%d",
430 433
                     getAddress(), getCallUUID(), hashCode());
431 434
         }
432 435
     }

Завантаження…
Відмінити
Зберегти