From 3bdbf90f496913d417af8b58ea48bd2d22b2aabf Mon Sep 17 00:00:00 2001 From: Leonardo Demartino Date: Sun, 17 Mar 2024 02:39:16 -0300 Subject: [PATCH] Fix AirPods routing when Play and Record category is used. --- platform/ios/app_delegate.mm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platform/ios/app_delegate.mm b/platform/ios/app_delegate.mm index 5a0c57be930..37d26964348 100644 --- a/platform/ios/app_delegate.mm +++ b/platform/ios/app_delegate.mm @@ -116,6 +116,8 @@ static ViewController *mainViewController = nil; } else if (sessionCategorySetting == SESSION_CATEGORY_PLAY_AND_RECORD) { category = AVAudioSessionCategoryPlayAndRecord; options |= AVAudioSessionCategoryOptionDefaultToSpeaker; + options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP; + options |= AVAudioSessionCategoryOptionAllowAirPlay; } else if (sessionCategorySetting == SESSION_CATEGORY_PLAYBACK) { category = AVAudioSessionCategoryPlayback; } else if (sessionCategorySetting == SESSION_CATEGORY_RECORD) {