瀏覽代碼

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
共有 1 個檔案被更改,包括 4 行新增1 行删除
  1. 4
    1
      android/sdk/src/main/java/org/jitsi/meet/sdk/ConnectionService.java

+ 4
- 1
android/sdk/src/main/java/org/jitsi/meet/sdk/ConnectionService.java 查看文件

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

Loading…
取消
儲存