Browse Source

Fix AirPods routing when Play and Record category is used.

Leonardo Demartino 1 year ago
parent
commit
3bdbf90f49
1 changed files with 2 additions and 0 deletions
  1. 2 0
      platform/ios/app_delegate.mm

+ 2 - 0
platform/ios/app_delegate.mm

@@ -116,6 +116,8 @@ static ViewController *mainViewController = nil;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAY_AND_RECORD) {
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAY_AND_RECORD) {
 		category = AVAudioSessionCategoryPlayAndRecord;
 		category = AVAudioSessionCategoryPlayAndRecord;
 		options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
 		options |= AVAudioSessionCategoryOptionDefaultToSpeaker;
+		options |= AVAudioSessionCategoryOptionAllowBluetoothA2DP;
+		options |= AVAudioSessionCategoryOptionAllowAirPlay;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAYBACK) {
 	} else if (sessionCategorySetting == SESSION_CATEGORY_PLAYBACK) {
 		category = AVAudioSessionCategoryPlayback;
 		category = AVAudioSessionCategoryPlayback;
 	} else if (sessionCategorySetting == SESSION_CATEGORY_RECORD) {
 	} else if (sessionCategorySetting == SESSION_CATEGORY_RECORD) {